From: Todd C. Miller Date: Thu, 5 Jan 2012 20:54:00 +0000 (-0500) Subject: Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a X-Git-Tag: SUDO_1_8_4~88^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4ba511613dc08f5ba4073645a92dc009e65904d;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. --- diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index 47e167636..cf842217c 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -477,7 +477,7 @@ command_matches_glob(char *sudoers_cmnd, char *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); debug_return_bool(false);