From: Todd C. Miller Date: Thu, 8 Jul 2004 00:15:37 +0000 (+0000) Subject: When matching for "sudoedit" in sudoers check both the command the user X-Git-Tag: SUDO_1_6_8~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6fe34784a9f1f4707d9fb2b79a743b1c64299e9;p=sudo When matching for "sudoedit" in sudoers check both the command the user typed *and* the command that is listed in the sudoers entry. --- 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)) ||