Log the session ID, if there is one. Currently logs ID=XXXXXX, perhaps

should be SESSIONID or SESSID.
This commit is contained in:
Todd C. Miller
2009-08-30 15:18:50 +00:00
parent 5181d496c4
commit 6184eb9461
4 changed files with 18 additions and 4 deletions

8
sudo.c
View File

@@ -461,6 +461,10 @@ main(argc, argv, envp)
validate_env_vars(sudo_user.env_vars);
}
/* Open tty and session ID as needed */
if (def_script)
script_setup();
log_allowed(validated);
if (ISSET(sudo_mode, MODE_CHECK))
rc = display_cmnd(snl, list_pw ? list_pw : sudo_user.pw);
@@ -499,10 +503,6 @@ main(argc, argv, envp)
/* Must audit before uid change. */
audit_success(NewArgv);
/* Open tty as needed */
if (def_script)
script_setup();
/* Become specified user or root if executing a command. */
if (ISSET(sudo_mode, MODE_RUN))
set_perms(PERM_FULL_RUNAS);