Use run_argv and run_envp passed into the audit plugin for event logging.

Previously we used NewArgv[] and env_get() but now that logging is
performed via an audit plugin we should use the values passed in.
This commit is contained in:
Todd C. Miller
2021-08-09 15:50:25 -06:00
parent 5e3ce532fe
commit 1ae9954c63
3 changed files with 4 additions and 4 deletions

View File

@@ -463,7 +463,7 @@ log_auth_failure(int status, unsigned int tries)
* Log and potentially mail the allowed command.
*/
bool
log_allowed(void)
log_allowed(char *const argv[], char *const envp[])
{
struct eventlog evlog;
int oldlocale;
@@ -478,7 +478,7 @@ log_allowed(void)
/* Log and mail messages should be in the sudoers locale. */
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
sudoers_to_eventlog(&evlog, NewArgv, env_get());
sudoers_to_eventlog(&evlog, argv, envp);
if (mailit) {
SET(evl_flags, EVLOG_MAIL);
if (!def_log_allowed)