From: Todd C. Miller Date: Thu, 8 Jul 1999 10:46:28 +0000 (+0000) Subject: only save an entry if user_matches && host_matches, even if the stack is empty (fix... X-Git-Tag: SUDO_1_6_0~255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63209c13488920229654610f7fd581b336d97289;p=sudo only save an entry if user_matches && host_matches, even if the stack is empty (fix for previous commit) --- diff --git a/parse.yacc b/parse.yacc index da26874d3..717bf80d9 100644 --- a/parse.yacc +++ b/parse.yacc @@ -301,9 +301,9 @@ cmndspec : runasspec nopasswd opcmnd { * saving (or if nothing else is on the stack) * and clear match status. */ - if ((user_matches == TRUE && host_matches == TRUE && - cmnd_matches != -1 && runas_matches != -1) || - top == 1) + if (user_matches == TRUE && host_matches == TRUE && + ((cmnd_matches != -1 && runas_matches != -1) || + top == 1)) pushcp; cmnd_matches = -1; }