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

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