Bug 692 - Manpage: Document more verbosely that wildcards are not regexes
Manpage: Document more verbosely that wildcards are not regexes
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Documentation
1.8.13
All All
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-23 03:42 MDT by Mateusz Jończyk
Modified: 2015-11-01 15:29 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 Mateusz Jończyk 2015-03-23 03:42:55 MDT
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"
Comment 1 Todd C. Miller 2015-08-07 12:38:01 MDT
Added emphasis in http://www.sudo.ws/repos/sudo/rev/1e071810c4cb
Comment 2 Todd C. Miller 2015-11-01 15:29:44 MST
Fixed in sudo 1.8.15