diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2010-02-22 22:41:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2010-02-22 22:41:11 +0000 |
commit | 5ca7aba1b915e0011b188970b7bfb2849a534250 (patch) | |
tree | 4e3637d9d6f2b1405f03556f68300353fdfe7660 | |
parent | 4660e2ea587412c1d405544cd62ce0c2d92e2cb1 (diff) |
Check for pseudo-command by looking at the first character of the
command in sudoers instead of checking the user-supplied command
for a slash.
-rw-r--r-- | usr.bin/sudo/match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sudo/match.c b/usr.bin/sudo/match.c index c0f917b25bb..7d707a40036 100644 --- a/usr.bin/sudo/match.c +++ b/usr.bin/sudo/match.c @@ -379,7 +379,7 @@ command_matches(sudoers_cmnd, sudoers_args) char *sudoers_args; { /* Check for pseudo-commands */ - if (strchr(user_cmnd, '/') == NULL) { + if (sudoers_cmnd[0] != '/') { /* * Return true if both sudoers_cmnd and user_cmnd are "sudoedit" AND * a) there are no args in sudoers OR |