From 1e9030d951fc2926eb021230ec4b88c3c3ba0790 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 8 Jul 2007 13:30:07 +0000 Subject: [PATCH] Move setting of FLAG_NO_CHECK into the if(pwflag) block. No change in behavior. --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0