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

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