Bug 864

Summary: Make -f optional for path argument
Product: Sudo Reporter: brent s. <brent.saner>
Component: VisudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: low    
Version: 1.8.26   
Hardware: PC   
OS: Linux   

Description brent s. 2018-12-11 21:30:20 MST
Currently to invoke visudo against a non-system-default (typically /etc/sudoers) sudoers file (such as /etc/sudoers.d/user_foo), one must do:

  visudo -f /etc/sudoers.d/user_foo

However, being that -f is the only switch that takes an argument AND there is NO default behaviour defined for providing a path as a positional argument (or even a positional argument at all), I suggest that -f be made optional.
e.g.:

  visudo /etc/sudoers.d/user_foo

would have the same effect as:

  visudo -f /etc/sudoers.d/user_foo
Comment 1 Todd C. Miller 2018-12-24 08:30:57 MST
Sure, that makes sense now that the JSON conversion code has moved to cvtsudoers.

This change will be in sudo 1.8.27:
https://www.sudo.ws/repos/sudo/rev/eb3d4c4461ba
Comment 2 Todd C. Miller 2019-01-12 10:03:49 MST
Fixed in sudo 1.8.27, out now.