Bug 312 - cmd alias matching is very slow
cmd alias matching is very slow
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.9
All All
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-12 14:29 MST by parkson.wong
Modified: 2009-07-28 14:19 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description parkson.wong 2008-11-12 14:29:25 MST
With the following cmd_alias in the sudoers file, sudo is very slow.
1.6.9 changed from previous release that it search the entire file system to look for the commands.


Cmd_Alias SUDO_NOCRUN = ALL, \
!/*/visudo, !/*/*/visudo, !/*/*/*/visudo, !/*/*/*/*/visudo, \
!/*/vi *sudoers*, !/*/*/vi*sudoers*, !/*/*/*/vi *sudoers*, \
!/*/*/*/*/vi *sudoers*, \
!/*/su "", !/*/*/su "", !/*/*/*/su "", \
!/*/su -, !/*/*/su -, !/*/*/*/su-, \
!/*/su *root*, !/*/*/su *root*, !/*/*/*/su *root*, \
!/*/sh, !/*/*/sh, !/*/*/*/sh, \
!/*/ksh, !/*/*/ksh, !/*/*/*/ksh,\
!/*/zsh, !/*/*/zsh, !/*/*/*/zsh,\
!/*/tcsh, !/*/*/tcsh, !/*/*/*/tcsh \
!/*/csh, !/*/*/csh, !/*/*/*/csh \
!/*/nsh, !/*/*/nsh, !/*/*/*/nsh
Comment 1 Todd C. Miller 2008-11-12 15:03:33 MST
Please try this 1.6.9p18 pre-release: ftp://ftp.sudo.ws/pub/millert/sudo/sudo-1.6.9p18.tar.gz
Comment 2 Todd C. Miller 2008-11-14 06:08:55 MST
sudo 1.6.9p18 has been released and addresses this issue.
Comment 3 parkson.wong 2009-07-21 18:48:29 MDT
Looks like the problem came back on 1.7.0.  Which file was the fix in?  Maybe I could go look and see if the changes are still there?
Comment 4 Todd C. Miller 2009-07-22 08:02:02 MDT
You need to add a line like this to sudoers:

Defaults fast_glob
Comment 5 Todd C. Miller 2009-07-22 08:13:49 MDT
Actually, you'll need to upgrade to sudo 1.7.1 or higher to get the fast_glob option.