Bug 864 - Make -f optional for path argument
Make -f optional for path argument
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Visudo
1.8.26
PC Linux
: low enhancement
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-11 21:30 MST by brent s.
Modified: 2019-01-12 10:03 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.