From: Todd C. Miller Date: Thu, 3 Sep 2009 23:26:05 +0000 (+0000) Subject: Only set the session id if we are running a command or editing a file. X-Git-Tag: SUDO_1_7_3~314 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f80fa34e74ae4c18c64f47894b0bd7d909bf9206;p=sudo Only set the session id if we are running a command or editing a file. --- diff --git a/sudo.c b/sudo.c index 3cc7cc44b..c54d4ee6f 100644 --- a/sudo.c +++ b/sudo.c @@ -461,8 +461,8 @@ main(argc, argv, envp) } /* Get next session ID so we can log it. */ - if (def_script) - script_nextid(); /* XXX - only if we will run a command */ + if (def_script && ISSET(sudo_mode, (MODE_RUN | MODE_EDIT))) + script_nextid(); log_allowed(validated); if (ISSET(sudo_mode, MODE_CHECK))