diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2000-01-17 04:05:18 +0000 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 2000-01-17 04:05:18 +0000 |
commit | 96bb36186608ca86a2becd983afde2ffe178b427 (patch) | |
tree | a2f61fe59c93b7b2f67ed62b7015263aba906638 /parse.c | |
parent | 620bba30b53b44e18bcdc418d16af70a421cb40e (diff) | |
download | sudo-96bb36186608ca86a2becd983afde2ffe178b427.tar.gz |
Add "listpw" and "verifypw" options.
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -129,7 +129,7 @@ sudoers_lookup(pwflags) init_parser(); /* For most pwflags to be useful we need to keep more state around. */ - if (pwflags && !(pwflags & PWCHECK_NEVER)) + if (pwflags && pwflags != PWCHECK_NEVER && pwflags != PWCHECK_ALWAYS) keepall = TRUE; /* Need to be root while stat'ing things in the parser. */ @@ -167,7 +167,7 @@ sudoers_lookup(pwflags) if (pwflags) { int nopass, found; - if ((pwflags & PWCHECK_NEVER) || !def_flag(I_AUTHENTICATE)) + if (pwflags == PWCHECK_NEVER || !def_flag(I_AUTHENTICATE)) nopass = FLAG_NOPASS; else nopass = -1; @@ -175,12 +175,10 @@ sudoers_lookup(pwflags) while (top) { if (host_matches == TRUE) { found = 1; - if (!(pwflags & PWCHECK_RUNAS) || runas_matches == TRUE) { - if ((pwflags & PWCHECK_ANY) && no_passwd == TRUE) - nopass = FLAG_NOPASS; - else if ((pwflags & PWCHECK_ALL) && nopass != 0) - nopass = (no_passwd == TRUE) ? FLAG_NOPASS : 0; - } + if (pwflags == PWCHECK_ANY && no_passwd == TRUE) + nopass = FLAG_NOPASS; + else if (pwflags == PWCHECK_ALL && nopass != 0) + nopass = (no_passwd == TRUE) ? FLAG_NOPASS : 0; } top--; } |