Bugzilla – Bug 692
Manpage: Document more verbosely that wildcards are not regexes
Last modified: 2015-11-01 15:29:44 MST
Hello, Many people tend to think in terms of regexes, not in terms of wildcards. In man sudoers in section "Wildcards" it is written: "Note that these are not regular expressions." but this is not enough to shift some people's thinking. Yesterday I decided to add a new stanza to my sudoers file and use regexes in it. I have read in the manual: "Note that these are not regular expressions." and understood that sentence but nevertheless I intuitively used regexes instead of wildcards in that stanza. Therefore, the man page should pronounce more clearly that wildcards do not work as regexes. For example it could read: "Note that wildcards in sudoers do not work like regexes. For example: [a-zA-Z]* matches any string that begins with a letter, even if it contains spaces, tabs or other weird characters. Furthermore, the following command specification /usr/bin/passwd [a-z]* would match /usr/bin/passwd user1 -a -s root so please be careful"
Added emphasis in http://www.sudo.ws/repos/sudo/rev/1e071810c4cb
Fixed in sudo 1.8.15