From: Todd C. Miller Date: Thu, 12 Jan 2012 20:21:36 +0000 (-0500) Subject: Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a X-Git-Tag: SUDO_1_7_9~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=acb916f2bab9ef52467f1d1bc5f095f4d10fa3db;p=sudo Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a bug where a pattern like "/usr/*" include /usr/bin/ in the results, which would be incorrectly be interpreted as if the sudoers file had specified a directory. From Vitezslav Cizek. --HG-- branch : 1.7 --- diff --git a/match.c b/match.c index 7568c83fb..40d93ba46 100644 --- a/match.c +++ b/match.c @@ -492,7 +492,7 @@ command_matches_glob(sudoers_cmnd, sudoers_args) * c) there are args in sudoers and on command line and they match * else return false. */ -#define GLOB_FLAGS (GLOB_NOSORT | GLOB_MARK | GLOB_BRACE | GLOB_TILDE) +#define GLOB_FLAGS (GLOB_NOSORT | GLOB_BRACE | GLOB_TILDE) if (glob(sudoers_cmnd, GLOB_FLAGS, NULL, &gl) != 0 || gl.gl_pathc == 0) { globfree(&gl); return FALSE;