Bug 164 - sudo ls wildcard bug
sudo ls wildcard bug
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.7
IBM AIX
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-29 12:27 MST by Toby Foote
Modified: 2004-12-30 00: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 Toby Foote 2004-12-29 12:27:17 MST
Assumptions:
1) A file called /etc/security/passwd exists with 700 access.
2) Running Sudo version 1.6.7p5 on AIX 5100-03

--------------------------

When I run "sudo ls -l /etc/security/p*", I get an error:
ls: 0653-341 The file /etc/security/p* does not exist.

When I run "sudo ls -l /etc/security", this command runs successfully.

It appears that when I use a wildcard, an error occurs.  Can you provide any 
insight to this bug/feature?

Thanks,
Toby Foote
sudo@tobyfoote.com
Comment 1 Todd C. Miller 2004-12-29 20:00:45 MST
Unlike DOS or Windoes, in Unix wilcard expansion is done by your shell, not the individual application. 
 Thus any wildcards should have been expanded before sudo is even run and this is done as the 
regular user and not root (or whatever user you are asking sudo to run things as).  If you quote the 
wildcards it prevents the shell from expanding then and ls will give an error like what you submitted.  
Sudo's wildcard support is limited to matching a given command to entries in the sudoers file itself.