Blame SOURCES/autofs-5.1.6-fix-lookup_nss_read_master-nsswicth-check-return.patch

d702dc
autofs-5.1.6 - fix lookup_nss_read_master() nsswicth check return
d702dc
d702dc
From: Ian Kent <raven@themaw.net>
d702dc
d702dc
When reading master map nsswicth sources the result of reading the master
d702dc
map should be returned rather than the result of the nsswitch check.
d702dc
d702dc
Signed-off-by: Ian Kent <raven@themaw.net>
d702dc
---
d702dc
 CHANGELOG       |    1 +
d702dc
 daemon/lookup.c |    6 ++----
d702dc
 2 files changed, 3 insertions(+), 4 deletions(-)
d702dc
d702dc
diff --git a/CHANGELOG b/CHANGELOG
d702dc
index 52fc100..3c00184 100644
d702dc
--- a/CHANGELOG
d702dc
+++ b/CHANGELOG
d702dc
@@ -91,6 +91,7 @@ xx/xx/2018 autofs-5.1.5
d702dc
 - remove command fifo on autofs mount fail.
d702dc
 - add force unlink mounts and exit option.
d702dc
 - cleanup stale logpri fifo pipes on unlink and exit.
d702dc
+- fix lookup_nss_read_master() nsswicth check return.
d702dc
 
d702dc
 19/12/2017 autofs-5.1.4
d702dc
 - fix spec file url.
d702dc
diff --git a/daemon/lookup.c b/daemon/lookup.c
d702dc
index d9d3a4e..2b9c7e8 100644
d702dc
--- a/daemon/lookup.c
d702dc
+++ b/daemon/lookup.c
d702dc
@@ -303,10 +303,8 @@ int lookup_nss_read_master(struct master *master, time_t age)
d702dc
 			master->read_fail = 1;
d702dc
 
d702dc
 		status = check_nss_result(this, result);
d702dc
-		if (status >= 0) {
d702dc
-			free_sources(&nsslist);
d702dc
-			return status;
d702dc
-		}
d702dc
+		if (status >= 0)
d702dc
+			break;
d702dc
 	}
d702dc
 
d702dc
 	if (!list_empty(&nsslist))