]> granicus.if.org Git - sudo/commitdiff
Accept quoted globbing characters and pass them verbatim for fnmatch()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 17 May 2004 20:51:13 +0000 (20:51 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 17 May 2004 20:51:13 +0000 (20:51 +0000)
parse.lex

index 713cbce16a8b8d874a35ddafa6a44ca137b21c7c..4b73836fd9fff0bc00a8a13678360aff9299d4a7 100644 (file)
--- a/parse.lex
+++ b/parse.lex
@@ -142,7 +142,15 @@ DEFVAR                     [a-z_]+
 }
 
 <GOTCMND>{
+    \\[\*\?\[\]\!]     {
+                           /* quoted fnmatch glob char, pass verbatim */
+                           LEXTRACE("QUOTEDCHAR ");
+                           fill_args(yytext, 2, sawspace);
+                           sawspace = FALSE;
+                       }
+
     \\[:\\,= \t#]      {
+                           /* quoted sudoers special char, strip backslash */
                            LEXTRACE("QUOTEDCHAR ");
                            fill_args(yytext + 1, 1, sawspace);
                            sawspace = FALSE;