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

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