Bug 714 - editor option executes in reverse order
editor option executes in reverse order
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudoers
1.8.14
PC Linux
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-21 11:13 MDT by James Nelson
Modified: 2015-11-01 15:26 MST (History)
0 users

See Also:


Attachments
Stop after finding the first valid editor (1.02 KB, patch)
2015-08-21 11:22 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Nelson 2015-08-21 11:13:44 MDT
Defaults editor = "/usr/bin/nano:/usr/bin/vim"

Currently this would execute vim first and then nano if vim couldn't be found. My EDITOR, SUDO_EDITOR, and VISUAL environment variables are undefined. If I define one of those, it correctly uses what I defined the variable with.
Comment 1 Todd C. Miller 2015-08-21 11:22:17 MDT
Created attachment 457 [details]
Stop after finding the first valid editor

The attached patch fixes the problem.
Comment 2 Todd C. Miller 2015-11-01 15:26:31 MST
Fixed in sudo 1.8.15