mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Don't NULL out the plugin close function when logging to a log server.
If sudo calls execve(2) directly the accept info will not be sent. We also need the sudo front-end to wait until the command finishes to send the exit status.
This commit is contained in:
@@ -1181,8 +1181,8 @@ sudoers_policy_check(int argc, char * const argv[], char *env_add[],
|
||||
#ifndef NO_LEAKS
|
||||
if (ret == true && sudo_version >= SUDO_API_MKVERSION(1, 3)) {
|
||||
/* Unset close function if we don't need it to avoid extra process. */
|
||||
if (!iolog_enabled && !def_log_exit_status && !def_use_pty &&
|
||||
!sudo_auth_needs_end_session())
|
||||
if (!iolog_enabled && !def_use_pty && !def_log_exit_status &&
|
||||
SLIST_EMPTY(&def_log_servers) && !sudo_auth_needs_end_session())
|
||||
sudoers_policy.close = NULL;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user