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

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