From: Todd C. Miller Date: Sun, 28 Apr 1996 21:12:45 +0000 (+0000) Subject: runas_matches is now set to false if we get a negative match X-Git-Tag: SUDO_1_5_0~207 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c9580971916c08286543d7f7ead0c07ff145d17;p=sudo runas_matches is now set to false if we get a negative match --- diff --git a/parse.yacc b/parse.yacc index bc3c78d45..0c2514dc7 100644 --- a/parse.yacc +++ b/parse.yacc @@ -156,7 +156,7 @@ void yyerror(s) %token ':' '=' ',' '!' '.' /* union member tokens */ %token ERROR -%type cmnd +%type cmnd %type runasspec %type runaslist %type 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 {