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

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