find_editor: remove the env_error argument
There is no case where we should fail to find an editor just because the values of EDITOR, VISUAL and SUDO_EDITOR are unavailable. Both sudoedit and the "env_editor" sudoers setting are documented as falling back on the hard-coded list of editors in the "editors" sudoers setting. Bug #1000
This commit is contained in:
@@ -769,7 +769,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
||||
|
||||
free(safe_cmnd);
|
||||
safe_cmnd = find_editor(NewArgc - 1, NewArgv + 1, &edit_argc,
|
||||
&edit_argv, NULL, &env_editor, false);
|
||||
&edit_argv, NULL, &env_editor);
|
||||
if (safe_cmnd == NULL) {
|
||||
if (errno != ENOENT)
|
||||
goto done;
|
||||
|
Reference in New Issue
Block a user