Split log_{input,output} into log_{stdin,ttyin} and log_{ttyout,stdout,stderr}
If log_input is set, log_{stdin,ttyin} will be set as well. If log_output is set, log_{stdout,stderr,ttyout} will be set as well. This provides more fine-grained control over I/O logging and makes it possible to disable logging piped or redirected intput or output.
This commit is contained in:
@@ -358,11 +358,13 @@ apply_cmndspec(struct cmndspec *cs)
|
||||
}
|
||||
if (cs->tags.log_input != UNSPEC) {
|
||||
def_log_input = cs->tags.log_input;
|
||||
cb_log_input(NULL, 0, 0, NULL, cs->tags.log_input);
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO,
|
||||
"def_log_input -> %s", def_log_input ? "true" : "false");
|
||||
}
|
||||
if (cs->tags.log_output != UNSPEC) {
|
||||
def_log_output = cs->tags.log_output;
|
||||
cb_log_output(NULL, 0, 0, NULL, cs->tags.log_output);
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO,
|
||||
"def_log_output -> %s", def_log_output ? "true" : "false");
|
||||
}
|
||||
|
Reference in New Issue
Block a user