As far as I know, the major difference is that visudo has a simple parser for seeing if /etc/sudoers (and other sudoers files) is goodly; however, I also noticed that, when I set
EDITOR=emacs, sudoedit honours the change, however, visudo does not. From what I can tell, this is because visudo does not honour
$EDITOR values unless they are listed in sudoers.
What I want to know is if I can make sudoedit do the same thing, so as to not allow things like
Another thing I noticed, which seems related, is that as root (after su-ing as user jef), (with the line
export EDITOR=emacs in /home/anachrome/.bashrc), both visudo and sudoedit use emacs as the editor, but when not su'd into root, only sudoedit uses it. I'm curious as to why this is (I presume it has something to do with sudo not actually resetting the evironment variables when sudoing as yourself (e.g.
root $ sudo -u root), but this is just me assuming).
EDIT: The second question is apparently just because
$EDITOR wasn't one of the variables kept by sudo.
And incidentally, I'm using Arch Linux, in case that's relevant.