If no iolog file is specified by the policy plugin, use io_nextid()

to determine the next file in the sequence.
This commit is contained in:
Todd C. Miller
2010-12-29 11:07:45 -05:00
parent 3f6f61f852
commit 97b7ae8892
3 changed files with 46 additions and 24 deletions

View File

@@ -510,11 +510,12 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
}
if (ISSET(sudo_mode, (MODE_RUN | MODE_EDIT)) && (def_log_input || def_log_output)) {
if (def_iolog_file) {
if (def_iolog_file && def_iolog_dir) {
if (strstr(def_iolog_file, "%{seq}") != NULL) /* XXX - inline? */
io_nextid();
command_info[info_len++] = expand_iolog_path("iolog_file=", def_iolog_file);
io_nextid(def_iolog_dir, sudo_user.sessid);
}
if (def_iolog_file)
command_info[info_len++] = expand_iolog_path("iolog_file=", def_iolog_file);
if (def_iolog_dir)
command_info[info_len++] = expand_iolog_path("iolog_dir=", def_iolog_dir);
if (def_log_input) {