]> granicus.if.org Git - sudo/commitdiff
Move setting of FLAG_NO_CHECK into the if(pwflag) block.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 8 Jul 2007 13:30:07 +0000 (13:30 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 8 Jul 2007 13:30:07 +0000 (13:30 +0000)
No change in behavior.

parse.c

diff --git a/parse.c b/parse.c
index 49e33e0b93e20c4235b5afa5a80397f06845e831..46c5f655ae914ed1f8054fc738a1bb0cd97fedf5 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -107,8 +107,6 @@ sudoers_lookup(pwflag)
 
     /* Assume the worst.  */
     validated = VALIDATE_NOT_OK | FLAG_NO_HOST | FLAG_NO_USER;
-    if (pwflag && list_pw == NULL)
-       SET(validated, FLAG_NO_CHECK);
 
     /*
      * Only check the actual command if pwflag is not set.
@@ -121,6 +119,8 @@ sudoers_lookup(pwflag)
 
        pwcheck = (pwflag == -1) ? never : sudo_defs_table[pwflag].sd_un.tuple;
 
+       if (list_pw == NULL)
+           SET(validated, FLAG_NO_CHECK);
        CLR(validated, FLAG_NO_USER);
        CLR(validated, FLAG_NO_HOST);
        matched = FALSE;