diff options
Diffstat (limited to 'src/vycli.ml')
| -rw-r--r-- | src/vycli.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vycli.ml b/src/vycli.ml index 174d6f4..6b13bdd 100644 --- a/src/vycli.ml +++ b/src/vycli.ml @@ -68,7 +68,15 @@ let main socket op path out_format config_format = end | OpSetupSession -> let pid = Int32.of_int (Unix.getppid ()) in - let%lwt resp = setup_session client "vycli" pid in + let user = + try Sys.getenv "USER" + with Not_found -> "" + in + let sudo_user = + try Sys.getenv "SUDO_USER" + with Not_found -> "" + in + let%lwt resp = setup_session client "vycli" sudo_user user pid in begin match resp with | Ok c -> get_token c |
