2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Give the policy module fine-grained control over what the I/O plugin

logs.
This commit is contained in:
Todd C. Miller
2010-12-21 17:43:18 -05:00
parent 6505d10ccf
commit 5d59c10b95
3 changed files with 103 additions and 21 deletions

View File

@@ -499,10 +499,19 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
validate_env_vars(sudo_user.env_vars);
}
if (ISSET(sudo_mode, (MODE_RUN| MODE_EDIT)) && (def_log_input || def_log_output)) {
if (ISSET(sudo_mode, (MODE_RUN | MODE_EDIT)) && (def_log_input || def_log_output)) {
io_nextid();
command_info[info_len++] = fmt_string("iolog_dir", def_iolog_dir);
command_info[info_len++] = fmt_string("iolog_file", sudo_user.sessid);
if (def_log_input) {
command_info[info_len++] = estrdup("iolog_stdin=true");
command_info[info_len++] = estrdup("iolog_ttyin=true");
}
if (def_log_output) {
command_info[info_len++] = estrdup("iolog_stdout=true");
command_info[info_len++] = estrdup("iolog_stderr=true");
command_info[info_len++] = estrdup("iolog_ttyout=true");
}
}
log_allowed(validated);