Blame SOURCES/autofs-5.1.6-fix-sss-master-map-wait-timing.patch

63b9c2
autofs-5.1.6 - fix sss_master_map_wait timing
63b9c2
63b9c2
From: Ian Kent <raven@themaw.net>
63b9c2
63b9c2
The sss lookup retry delay is half a second but the sss daemon timeouts
63b9c2
are fairly long so change the retry delay to one second.
63b9c2
63b9c2
Signed-off-by: Ian Kent <raven@themaw.net>
63b9c2
---
63b9c2
 CHANGELOG            |    1 +
63b9c2
 modules/lookup_sss.c |   10 +++++-----
63b9c2
 2 files changed, 6 insertions(+), 5 deletions(-)
63b9c2
63b9c2
diff --git a/CHANGELOG b/CHANGELOG
63b9c2
index 63c6d41..5a3d785 100644
63b9c2
--- a/CHANGELOG
63b9c2
+++ b/CHANGELOG
63b9c2
@@ -93,6 +93,7 @@ xx/xx/2018 autofs-5.1.5
63b9c2
 - cleanup stale logpri fifo pipes on unlink and exit.
63b9c2
 - fix lookup_nss_read_master() nsswicth check return.
63b9c2
 - fix typo in open_sss_lib().
63b9c2
+- fix sss_master_map_wait timing.
63b9c2
 
63b9c2
 19/12/2017 autofs-5.1.4
63b9c2
 - fix spec file url.
63b9c2
diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c
63b9c2
index cc18e62..fbb6193 100644
63b9c2
--- a/modules/lookup_sss.c
63b9c2
+++ b/modules/lookup_sss.c
63b9c2
@@ -30,8 +30,8 @@
63b9c2
 
63b9c2
 #define MAPFMT_DEFAULT "sun"
63b9c2
 
63b9c2
-/* Half a second between retries */
63b9c2
-#define SETAUTOMOUNTENT_MASTER_INTERVAL	500000000
63b9c2
+/* One second between retries */
63b9c2
+#define SSS_WAIT_INTERVAL	1
63b9c2
 
63b9c2
 #define MODPREFIX "lookup(sss): "
63b9c2
 
63b9c2
@@ -230,8 +230,8 @@ static int setautomntent_wait(unsigned int logopt,
63b9c2
 
63b9c2
 	*sss_ctxt = NULL;
63b9c2
 
63b9c2
-	while (++retry < retries) {
63b9c2
-		struct timespec t = { 0, SETAUTOMOUNTENT_MASTER_INTERVAL };
63b9c2
+	while (++retry <= retries) {
63b9c2
+		struct timespec t = { SSS_WAIT_INTERVAL, 0 };
63b9c2
 		struct timespec r;
63b9c2
 
63b9c2
 		ret = ctxt->setautomntent(mapname, sss_ctxt);
63b9c2
@@ -300,7 +300,7 @@ int lookup_read_master(struct master *master, time_t age, void *context)
63b9c2
 		if (ret != ENOENT)
63b9c2
 			return NSS_STATUS_UNAVAIL;
63b9c2
 
63b9c2
-		retries = defaults_get_sss_master_map_wait() * 2;
63b9c2
+		retries = defaults_get_sss_master_map_wait();
63b9c2
 		if (retries <= 0)
63b9c2
 			return NSS_STATUS_NOTFOUND;
63b9c2