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

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