autofs-5.1.6 - fix sss_master_map_wait timing From: Ian Kent 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 --- CHANGELOG | 1 + modules/lookup_sss.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c67eddea..984c515b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,7 @@ xx/xx/2020 autofs-5.1.7 - fix crash in sun_mount(). - fix lookup_nss_read_master() nsswicth check return. - fix typo in open_sss_lib(). +- fix sss_master_map_wait timing. 07/10/2019 autofs-5.1.6 - support strictexpire mount option. diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c index 908752b6..da17df9a 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;