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

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