Blame SOURCES/autofs-5.1.2-fix-work-around-sss-startup-delay.patch

23b4c9
autofs-5.1.2 - fix work around sss startup delay
23b4c9
23b4c9
From: Ian Kent <raven@themaw.net>
23b4c9
23b4c9
If a sss startup delay has been configured to non-zero autofs will
23b4c9
wait up to the configured time and return NSS_STATUS_UNAVAIL or
23b4c9
NSS_STATUS_NOTFOUND even if setautomntent_wait() returns success.
23b4c9
23b4c9
Signed-off-by: Ian Kent <raven@themaw.net>
23b4c9
---
23b4c9
 CHANGELOG            |    1 +
23b4c9
 modules/lookup_sss.c |    8 +++++---
23b4c9
 2 files changed, 6 insertions(+), 3 deletions(-)
23b4c9
23b4c9
--- autofs-5.0.7.orig/CHANGELOG
23b4c9
+++ autofs-5.0.7/CHANGELOG
23b4c9
@@ -244,6 +244,7 @@
23b4c9
 - add sss master map wait config option.
23b4c9
 - use autofs_point to store expire timeout where possibe.
23b4c9
 - fix possible NULL derefernce.
23b4c9
+- fix work around sss startup delay.
23b4c9
 
23b4c9
 25/07/2012 autofs-5.0.7
23b4c9
 =======================
23b4c9
--- autofs-5.0.7.orig/modules/lookup_sss.c
23b4c9
+++ autofs-5.0.7/modules/lookup_sss.c
23b4c9
@@ -309,9 +309,11 @@ int lookup_read_master(struct master *ma
23b4c9
 		ret = setautomntent_wait(logopt,
23b4c9
 					 ctxt, ctxt->mapname, &sss_ctxt,
23b4c9
 					 retries);
23b4c9
-		if (ret == ENOENT)
23b4c9
-			return NSS_STATUS_NOTFOUND;
23b4c9
-		return NSS_STATUS_UNAVAIL;
23b4c9
+		if (ret) {
23b4c9
+			if (ret == ENOENT)
23b4c9
+				return NSS_STATUS_NOTFOUND;
23b4c9
+			return NSS_STATUS_UNAVAIL;
23b4c9
+		}
23b4c9
 	}
23b4c9
 
23b4c9
 	count = 0;