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

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