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

61 lines
1.7 KiB
Diff
Raw Normal View History

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