From a6fe34784a9f1f4707d9fb2b79a743b1c64299e9 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 8 Jul 2004 00:15:37 +0000 Subject: [PATCH] When matching for "sudoedit" in sudoers check both the command the user typed *and* the command that is listed in the sudoers entry. --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index 94439077c..77e2116fc 100644 --- a/parse.c +++ b/parse.c @@ -249,7 +249,7 @@ command_matches(cmnd, cmnd_args, path, sudoers_args) * b) there are no args on command line and none req by sudoers OR * c) there are args in sudoers and on command line and they match */ - if (strcmp(cmnd, "sudoedit") != 0) + if (strcmp(cmnd, "sudoedit") != 0 || strcmp(path, "sudoedit") != 0) return(FALSE); if (!sudoers_args || (!cmnd_args && sudoers_args && !strcmp("\"\"", sudoers_args)) || -- 2.40.0