|
Bugzilla – Full Text Bug Listing |
| Summary: | Parse buglet? | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Andres Salomon <dilinger> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | normal | ||
| Version: | 1.6.3 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Yes, the sudo lexer needs some work to become more stateful. There is no easy fix at this point. This will be fixed in sudo 1.6.4 which uses exclusive states in the lexer when tokenizing command line args. |
Given the following entry in my sudoers file, with sudo 1.6.3p6: apache ALL=NOPASSWD: /usr/bin/php -d include_path=.\:/etc/awesom -f /home/httpd/html/voxel/ubersmith/awesom/caller.php %3[cC]%3[fF]xml[-a-zA-Z0-9\\.\\+_%]* I get: >>> sudoers file: syntax error, line 16 <<< sudo: parse error in /etc/sudoers near line 16 The offending character in this entry is the command argument starting with %. The workaround: apache ALL=NOPASSWD: /usr/bin/php -d include_path=.\:/etc/awesom -f /home/httpd/html/voxel/ubersmith/awesom/caller.php [%]3[cC]%3[fF]xml[-a-zA-Z0-9\\.\\+_%]* At which point I get (w/ sudo -l): User apache may run the following commands on this host: (root) NOPASSWD: /usr/bin/php -d include_path=.:/etc/awesom -f /home/httpd/html/voxel/ubersmith/awesom/caller.php [%]3[cC]%3[fF]xml[-a-zA-Z0-9\.\+_%]* My hunch is that sudo thinks the regex that starts w/ % is a group; however, if I understand the sudoers man page, groups are not allowed where commands would be listed.