]> granicus.if.org Git - sudo/commitdiff
only save an entry if user_matches && host_matches, even if the stack is empty (fix...
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 8 Jul 1999 10:46:28 +0000 (10:46 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 8 Jul 1999 10:46:28 +0000 (10:46 +0000)
parse.yacc

index da26874d3234bab6e610f6024efbf53baec72bd8..717bf80d953a2849e1d38520baa073e0d46bbf3d 100644 (file)
@@ -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;
                        }