mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 22:35:10 +00:00
Only treat failure of expand_iolog_path() as fatal if ignore_iolog_errors
is not set.
This commit is contained in:
@@ -493,11 +493,17 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
||||
const char prefix[] = "iolog_path=";
|
||||
iolog_path = expand_iolog_path(prefix, def_iolog_dir,
|
||||
def_iolog_file, &sudo_user.iolog_file);
|
||||
if (iolog_path == NULL)
|
||||
if (iolog_path == NULL) {
|
||||
if (!def_ignore_iolog_errors)
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!log_allowed(validated) && !def_ignore_logfile_errors)
|
||||
goto bad;
|
||||
|
Reference in New Issue
Block a user