From: Todd C. Miller Date: Sun, 8 Jul 2007 13:30:07 +0000 (+0000) Subject: Move setting of FLAG_NO_CHECK into the if(pwflag) block. X-Git-Tag: SUDO_1_7_0~501 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e9030d951fc2926eb021230ec4b88c3c3ba0790;p=sudo Move setting of FLAG_NO_CHECK into the if(pwflag) block. No change in behavior. --- diff --git a/parse.c b/parse.c index 49e33e0b9..46c5f655a 100644 --- 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;