Blame SOURCES/sudo-1.8.6p7-duplicatenssfix.patch

523624
diff -up sudo-1.8.6p7/plugins/sudoers/sudo_nss.c.duplicatenssfix sudo-1.8.6p7/plugins/sudoers/sudo_nss.c
523624
--- sudo-1.8.6p7/plugins/sudoers/sudo_nss.c.duplicatenssfix	2014-09-29 15:30:35.243303099 +0200
523624
+++ sudo-1.8.6p7/plugins/sudoers/sudo_nss.c	2014-09-29 15:33:13.669439300 +0200
523624
@@ -88,16 +88,16 @@ sudo_read_nss(void)
523624
 	for ((cp = strtok(cp + 8, " \t")); cp != NULL; (cp = strtok(NULL, " \t"))) {
523624
 	    if (strcasecmp(cp, "files") == 0 && !saw_files) {
523624
 		tq_append(&snl, &sudo_nss_file);
523624
-		got_match = true;
523624
+		got_match = saw_files = true;
523624
 #ifdef HAVE_LDAP
523624
 	    } else if (strcasecmp(cp, "ldap") == 0 && !saw_ldap) {
523624
 		tq_append(&snl, &sudo_nss_ldap);
523624
-		got_match = true;
523624
+		got_match = saw_ldap = true;
523624
 #endif
523624
 #ifdef HAVE_SSSD
523624
 	    } else if (strcasecmp(cp, "sss") == 0 && !saw_sss) {
523624
 		tq_append(&snl, &sudo_nss_sss);
523624
-		got_match = true;
523624
+		got_match = saw_sss = true;
523624
 #endif
523624
 	    } else if (strcasecmp(cp, "[NOTFOUND=return]") == 0 && got_match) {
523624
 		/* NOTFOUND affects the most recent entry */
523624
@@ -171,20 +171,20 @@ sudo_read_nss(void)
523624
 	    if (!saw_files && strncasecmp(cp, "files", 5) == 0 &&
523624
 		(isspace((unsigned char)cp[5]) || cp[5] == '\0')) {
523624
 		tq_append(&snl, &sudo_nss_file);
523624
-		got_match = true;
523624
+		got_match = saw_files = true;
523624
 		ep = &cp[5];
523624
 #ifdef HAVE_LDAP
523624
 	    } else if (!saw_ldap && strncasecmp(cp, "ldap", 4) == 0 &&
523624
 		(isspace((unsigned char)cp[4]) || cp[4] == '\0')) {
523624
 		tq_append(&snl, &sudo_nss_ldap);
523624
-		got_match = true;
523624
+		got_match = saw_ldap = true;
523624
 		ep = &cp[4];
523624
 #endif
523624
 #ifdef HAVE_SSSD
523624
 	    } else if (!saw_sss && strncasecmp(cp, "sss", 3) == 0 &&
523624
 		(isspace((unsigned char)cp[3]) || cp[3] == '\0')) {
523624
 		tq_append(&snl, &sudo_nss_sss);
523624
-		got_match = true;
523624
+		got_match = saw_sss = true;
523624
 		ep = &cp[3];
523624
 #endif
523624
 	    } else {