- add changes for RHEL-127179.

This commit is contained in:
Ian Kent 2025-11-25 11:18:00 +08:00
parent f5d809c824
commit 8db1bd84f1
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,49 @@
autofs-5.1.9 - handle sss special case getautomntbyname() error
From: Ian Kent <raven@themaw.net>
The sss key lookup (via getautomntbyname()) returns EHOSTDOWN when the
entry is invalid, such as when the location is empty. But setatomntent()
has already been called successfully so we know the host is up and the
map exists hence this probably should be EINVAL.
In both these cases the better return is NSS_STATUS_UNAVAIL.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/lookup_sss.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -166,6 +166,7 @@
- always recreate credential cache.
- fix always recreate credential cache.
- fix missing unlock in sasl_do_kinit_ext_cc().
+- handle sss special case getautomntbyname() error.
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/modules/lookup_sss.c
+++ autofs-5.1.4/modules/lookup_sss.c
@@ -658,8 +658,8 @@ static int getautomntbyname(unsigned int
err = NSS_STATUS_NOTFOUND;
goto free;
}
- if (ret != EHOSTDOWN)
- goto error;
+ if (ret == EINVAL || ret == EHOSTDOWN)
+ goto free;
}
ret = getautomntbyname_wait(logopt, ctxt,
@@ -670,7 +670,7 @@ static int getautomntbyname(unsigned int
if (ret == ETIMEDOUT)
goto error;
/* sss proto version 0 and sss timeout not set */
- if (ret == EINVAL)
+ if (ret == EINVAL || ret == EHOSTDOWN)
goto free;
if (ret == ENOENT) {
err = NSS_STATUS_NOTFOUND;

View File

@ -8,7 +8,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.1.4
Release: 114%{?dist}.5
Release: 114%{?dist}.6
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@ -353,6 +353,9 @@ Patch342: autofs-5.1.9-fix-always-recreate-credential-cache.patch
# JIRA: RHEL-111930
Patch343: autofs-5.1.8-fix-missing-unlock-in-sasl_do_kinit_ext_cc.patch
# JIRA: RHEL-127179
Patch344: autofs-5.1.9-handle-sss-special-case-getautomntbyname-error.patch
%if %{with_systemd}
BuildRequires: systemd-units
BuildRequires: systemd-devel
@ -744,6 +747,8 @@ echo %{version}-%{release} > .version
%patch -P 343 -p1
%patch -P 344 -p1
%build
LDFLAGS=-Wl,-z,now
%configure --disable-mount-locking --enable-ignore-busy --with-libtirpc --without-hesiod %{?systemd_configure_arg:}
@ -838,6 +843,13 @@ fi
%dir /etc/auto.master.d
%changelog
* Tue Nov 25 2025 Ian Kent <ikent@redhat.com> - 5.1.4-114.el8_10.6
- RHEL-127179 - sssd autofs fails to get correct EHOSTDOWN if requested
incorrect mount after upgrade to sssd-2.9.1-4.el8_9.5.x86_64
[rhel-8.10.z]
- handle sss special case getautomntbyname() error.
- Resolves: RHEL-127179
* Mon Sep 01 2025 Ian Kent <ikent@redhat.com> - 5.1.4-114.el8_10.5
- RHEL-111930 - automount blocked when attempting to lookup ldap maps
- fix missing unlock in sasl_do_kinit_ext_cc().