From: Todd C. Miller Date: Tue, 4 Sep 2012 13:22:10 +0000 (-0400) Subject: Add support for [SUCCESS=return] in nsswitch.conf; from Daniel Kopecek X-Git-Tag: SUDO_1_8_6p1~1^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d787df3c1d2217daf89d2818cda84ad7591fae06;p=sudo Add support for [SUCCESS=return] in nsswitch.conf; from Daniel Kopecek --- diff --git a/plugins/sudoers/sudo_nss.c b/plugins/sudoers/sudo_nss.c index 5a1b3e124..ceccc7b32 100644 --- a/plugins/sudoers/sudo_nss.c +++ b/plugins/sudoers/sudo_nss.c @@ -99,6 +99,10 @@ sudo_read_nss(void) /* NOTFOUND affects the most recent entry */ tq_last(&snl)->ret_if_notfound = true; got_match = false; + } else if (strcasecmp(cp, "[SUCCESS=return]") == 0 && got_match) { + /* SUCCESS affects the most recent entry */ + tq_last(&snl)->ret_if_found = true; + got_match = false; } else got_match = false; } diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 6998797de..fc2a51c68 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -393,7 +393,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], validated = nss->lookup(nss, validated, pwflag); if (ISSET(validated, VALIDATE_OK)) { - /* Handle "= auth" in netsvc.conf */ + /* Handle [SUCCESS=return] */ if (nss->ret_if_found) break; } else {