From 2a236bd218f75a394904cd2c2184fbf2c2fd446f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 22 Feb 2010 17:32:24 -0500 Subject: [PATCH] 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. --HG-- branch : 1.7 --- match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/match.c b/match.c index 8bfbdf9a1..38acec43b 100644 --- a/match.c +++ b/match.c @@ -375,7 +375,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 -- 2.40.0