mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Only treat failure of expand_iolog_path() as fatal if ignore_iolog_errors
is not set.
This commit is contained in:
@@ -493,9 +493,15 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
|||||||
const char prefix[] = "iolog_path=";
|
const char prefix[] = "iolog_path=";
|
||||||
iolog_path = expand_iolog_path(prefix, def_iolog_dir,
|
iolog_path = expand_iolog_path(prefix, def_iolog_dir,
|
||||||
def_iolog_file, &sudo_user.iolog_file);
|
def_iolog_file, &sudo_user.iolog_file);
|
||||||
if (iolog_path == NULL)
|
if (iolog_path == NULL) {
|
||||||
goto done;
|
if (!def_ignore_iolog_errors)
|
||||||
sudo_user.iolog_file++;
|
goto done;
|
||||||
|
/* Unable to expand I/O log path, disable I/O logging. */
|
||||||
|
def_log_input = false;
|
||||||
|
def_log_output = false;
|
||||||
|
} else {
|
||||||
|
sudo_user.iolog_file++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user