]> granicus.if.org Git - sudo/commitdiff
Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 12 Jan 2012 20:21:36 +0000 (15:21 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 12 Jan 2012 20:21:36 +0000 (15:21 -0500)
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

match.c

diff --git a/match.c b/match.c
index 7568c83fb5f6ce7930b78a76bc65a4f73947143f..40d93ba46ea0d5327c6fb3cf38a509937a682fa2 100644 (file)
--- 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;