Bugzilla – Bug 1000
Failing resolution of conflicting def_editor and env_editor
Last modified: 2022-01-27 19:51:01 MST
https://bbs.archlinux.org/viewtopic.php?pid=1995344#p1995344 If the editors are restricted (to one) visudo will fail to use it if eg. $EDITOR is set to a disallowed value - despite efforts to make it ignore it. The error message isn't particularily helpful either, but I guess one could just use the first allowed editor in case of a contradiction and certainly the variables should be ignored for "!env_editor"?
Thanks for reporting this. It is fixed by the following commit: https://www.sudo.ws/repos/sudo/rev/caa529a0cab6 The intent is to honor EDITOR, VISUAL or SUDO_EDITOR as long as they match one of the values in "editors" in sudoers. If no match is found, the first editor listed in "editors" that exists should be used.
The changes are present in the 1.9.9 release.