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:
Todd C. Miller
2021-09-29 10:25:19 -06:00
parent dde951a098
commit d15e117c2e
7 changed files with 15 additions and 16 deletions

View File

@@ -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;