]> granicus.if.org Git - sudo/commitdiff
runas_matches is now set to false if we get a negative match
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 28 Apr 1996 21:12:45 +0000 (21:12 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 28 Apr 1996 21:12:45 +0000 (21:12 +0000)
parse.yacc

index bc3c78d4550158ec4bf58340f34ce48731d9bdc4..0c2514dc7ea81f258f3c2e3cd292f636ca4b9662 100644 (file)
@@ -156,7 +156,7 @@ void yyerror(s)
 %token <tok>    ':' '=' ',' '!' '.'    /* union member tokens */
 %token <tok>    ERROR
 
-%type <BOOLEAN>          cmnd
+%type <BOOLEAN>         cmnd
 %type <BOOLEAN>         runasspec
 %type <BOOLEAN>         runaslist 
 %type <BOOLEAN>         runasuser
@@ -252,13 +252,15 @@ opcmnd            :  cmnd { ; }
                            else if (cmnd_matched == FALSE)
                                cmnd_matches = TRUE;
                        }
-               |       runasspec {;}
-               |       nopassreq {;}
+               |       runasspec { ; }
+               |       nopassreq { ; }
                ;
 
 runasspec      :       RUNAS runaslist chkcmnd {
                            if ($2 > 0 && $3 == TRUE) 
                                runas_matches = TRUE;
+                           else
+                               runas_matches = FALSE;
                        }
 
 runaslist      :       runasuser {