Bug 224 - sudoers documentation is unclear about wildcards in hostames
sudoers documentation is unclear about wildcards in hostames
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Documentation
1.6.8
Macintosh Other
: low normal
Assigned To: Todd C. Miller
http://sudo.ws/sudo/man/sudoers.html#...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-17 16:34 MDT by Chris Pepper
Modified: 2008-12-03 16:00 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 Chris Pepper 2006-10-17 16:34:26 MDT
The wildcards section of the sudoers manual page says wildcards are valid in pathnames and command lines, but doesn't mention hostnames:

sudo allows shell-style wildcards (aka meta or glob characters) to be used in pathnames as well as command line arguments in the sudoers file. Wildcard matching is done via the POSIX fnmatch(3) routine. Note that these are not regular expressions.

On the other hand, the Aliases section says they're valid in hostnames:

A Host_List is made up of one or more hostnames, IP addresses, network numbers, netgroups (prefixed with '+') and other aliases. Again, the value of an item may be negated with the '!' operator. If you do not specify a netmask with a network number, the netmask of the host's ethernet interface(s) will be used when matching. The netmask may be specified either in dotted quad notation (e.g. 255.255.255.0) or CIDR notation (number of bits, e.g. 24). A hostname may include shell-style wildcards (see the Wildcards section below), but unless the hostname command on your machine returns the fully qualified hostname, you'll need to use the fqdn option for wildcards to be useful.
Comment 1 Todd C. Miller 2008-12-03 15:59:44 MST
Added hostnames to Wildcards section of the manual.
Comment 2 Todd C. Miller 2008-12-03 16:00:56 MST
Added hostnames to Wildcards section of the manual.