summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2010-02-22 22:41:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2010-02-22 22:41:11 +0000
commit5ca7aba1b915e0011b188970b7bfb2849a534250 (patch)
tree4e3637d9d6f2b1405f03556f68300353fdfe7660
parent4660e2ea587412c1d405544cd62ce0c2d92e2cb1 (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.c2
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