Blame SOURCES/autofs-5.1.6-fix-retries-check-in-setautomntent_wait.patch

1b50e3
autofs-5.1.6 - fix retries check in setautomntent_wait()
1b50e3
1b50e3
From: Ian Kent <raven@themaw.net>
1b50e3
1b50e3
In setautomntent_wait() on exit from the retry loop retry will always
1b50e3
be greater than retries if the retry limit is reached.
1b50e3
1b50e3
Signed-off-by: Ian Kent <raven@themaw.net>
1b50e3
---
1b50e3
 CHANGELOG            |    1 +
1b50e3
 modules/lookup_sss.c |    2 +-
1b50e3
 2 files changed, 2 insertions(+), 1 deletion(-)
1b50e3
1b50e3
diff --git a/CHANGELOG b/CHANGELOG
1b50e3
index 7c22aa1..b3ffbb6 100644
1b50e3
--- a/CHANGELOG
1b50e3
+++ b/CHANGELOG
1b50e3
@@ -97,6 +97,7 @@ xx/xx/2018 autofs-5.1.5
1b50e3
 - add sss ECONREFUSED return handling.
1b50e3
 - use mapname in sss context for setautomntent().
1b50e3
 - add support for new sss autofs proto version call.
1b50e3
+- fix retries check in setautomntent_wait().
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 3819981..d65e71c 100644
1b50e3
--- a/modules/lookup_sss.c
1b50e3
+++ b/modules/lookup_sss.c
1b50e3
@@ -299,7 +299,7 @@ static int setautomntent_wait(unsigned int logopt,
1b50e3
 			*sss_ctxt = NULL;
1b50e3
 		}
1b50e3
 
1b50e3
-		if (retry == retries)
1b50e3
+		if (retry > retries)
1b50e3
 			ret = ETIMEDOUT;
1b50e3
 
1b50e3
 		estr = strerror_r(ret, buf, MAX_ERR_BUF);