Bugzilla – Bug 449
wildcards in command alias match space
Last modified: 2010-11-30 12:31:31 MST
with an entry like: luser ALL=(ALL) NOPASSWD: /bin/cat /var/log/fubar/* sudo allows luser to run commands like sudo /bin/cat /var/log/fubar/foo /etc/shadow quick workaround is making an entry like luser ALL=(ALL) NOPASSWD: /bin/cat /var/log/fubar/*,!/bin/cat /var/log/fubar/* *
The command line arguments are matched as a single string, which is why * matches a space. This is less than ideal but it is the historic behavior. A future version of sudo will include regular expression support for more flexible matching.