aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2023-06-12 14:26:49 +0800
committerIan Kent <raven@themaw.net>2023-07-13 10:25:27 +0800
commit71ff3b84c0c71511df078da53a86d43873c3e7d7 (patch)
tree4fb5dc5e2d537015f026f5c5290b70e56ea80e91
parent23a98253f5b4a6bb5b06b2863ea3882d5e05853c (diff)
downloadautofs-71ff3b84c0c71511df078da53a86d43873c3e7d7.tar.gz
autofs-5.1.8 - fix some sss error return cases
There are some cases where the error return handling isn't quite right, fix them. Also fix a typo. in configuration file comment. Signed-off-by: Ian Kent <raven@themaw.net>
-rw-r--r--CHANGELOG1
-rw-r--r--modules/lookup_sss.c6
-rw-r--r--redhat/autofs.conf.default.in2
-rw-r--r--samples/autofs.conf.default.in2
4 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3885474c..3a0351cb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -92,6 +92,7 @@
- make open files limit configurable.
- use correct reference for IN6 macro call.
- dont probe interface that cant send packet.
+- fix some sss error return cases.
19/10/2021 autofs-5.1.8
- add xdr_exports().
diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c
index 7eb7e783..19e840a5 100644
--- a/modules/lookup_sss.c
+++ b/modules/lookup_sss.c
@@ -368,7 +368,7 @@ static int setautomntent_wait(unsigned int logopt,
*sss_ctxt = NULL;
}
- if (proto_version(ctxt) == 0 && retry > retries)
+ if (proto_version(ctxt) == 0 && retry >= retries)
ret = ETIMEDOUT;
}
return ret;
@@ -496,7 +496,7 @@ static int getautomntent_wait(unsigned int logopt,
info(logopt,
"successfully contacted sssd to get map entry");
else {
- if (retry == retries)
+ if (proto_version(ctxt) == 0 && retry >= retries)
ret = ETIMEDOUT;
}
return ret;
@@ -621,7 +621,7 @@ static int getautomntbyname_wait(unsigned int logopt,
info(logopt,
"successfully contacted sssd to lookup key value");
else {
- if (proto_version(ctxt) == 0 && retry > retries)
+ if (proto_version(ctxt) == 0 && retry >= retries)
ret = ETIMEDOUT;
}
return ret;
diff --git a/redhat/autofs.conf.default.in b/redhat/autofs.conf.default.in
index 50f50329..fb4b002d 100644
--- a/redhat/autofs.conf.default.in
+++ b/redhat/autofs.conf.default.in
@@ -214,7 +214,7 @@ mount_nfs_default_protocol = 4
# sss_master_map_wait - When sssd is starting up it can sometimes return
# "no such entry" for a short time until it has read
# in the LDAP map information. Internal default is 0
-# (don't wait) or 10 if sss supports returning EHSTDOWN.
+# (don't wait) or 10 if sss supports returning EHOSTDOWN.
# If there is a problem with autofs not finding the
# master map at startup (when it should) then try setting
# this to 10 or more. If the sss library supports returning
diff --git a/samples/autofs.conf.default.in b/samples/autofs.conf.default.in
index 94635203..94f95305 100644
--- a/samples/autofs.conf.default.in
+++ b/samples/autofs.conf.default.in
@@ -213,7 +213,7 @@ browse_mode = no
# sss_master_map_wait - When sssd is starting up it can sometimes return
# "no such entry" for a short time until it has read
# in the LDAP map information. Internal default is 0
-# (don't wait) or 10 if sss supports returning EHSTDOWN.
+# (don't wait) or 10 if sss supports returning EHOSTDOWN.
# If there is a problem with autofs not finding the
# master map at startup (when it should) then try setting
# this to 10 or more. If the sss library supports returning