import autofs-5.1.4-48.el8_4.1

This commit is contained in:
CentOS Sources 2021-08-10 08:02:36 -04:00 committed by Andrew Lukoshko
parent d87de17fdf
commit 6c524ac8f9
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,47 @@
autofs-5.1.6 - fix empty mounts list return from unlink_mount_tree()
From: Ian Kent <raven@themaw.net>
If there are no appropriate mounts found by get_mnt_list() then
unlink_mount_tree() should return 1 not 0 since if there are no
mounts to umount this shouldn't cause a failure return.
Also, if a real error occurs in get_mnt_list() we should check for
it and return a failure from unlink_mount_tree() since that would
be mount table not found or out of memory. If that's ignored things
would only get worse from that point.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
lib/mounts.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -111,6 +111,7 @@ xx/xx/2018 autofs-5.1.5
- use a valid timeout in lookup_prune_one_cache().
- dont prune offset map entries.
- simplify sss source stale check.
+- fix empty mounts list return from unlink_mount_tree().
19/12/2017 autofs-5.1.4
- fix spec file url.
--- autofs-5.1.4.orig/lib/mounts.c
+++ autofs-5.1.4/lib/mounts.c
@@ -954,9 +954,13 @@ int unlink_mount_tree(struct autofs_poin
struct mnt_list *mnts, *mnt;
int rv, ret = 1;
+ errno = 0;
mnts = get_mnt_list(mp, 1);
- if (!mnts)
- return 0;
+ if (!mnts) {
+ if (errno)
+ return 0;
+ return 1;
+ }
for (mnt = mnts; mnt; mnt = mnt->next) {
if (mnt->flags & MNTS_AUTOFS)

View File

@ -8,7 +8,7 @@
Summary: A tool for automatically mounting and unmounting filesystems Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs Name: autofs
Version: 5.1.4 Version: 5.1.4
Release: 48%{?dist} Release: 48%{?dist}.1
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
@ -134,6 +134,8 @@ Patch117: autofs-5.1.6-use-a-valid-timeout-in-lookup_prune_one_cache.patch
Patch118: autofs-5.1.6-dont-prune-offset-map-entries.patch Patch118: autofs-5.1.6-dont-prune-offset-map-entries.patch
Patch119: autofs-5.1.6-simplify-sss-source-stale-check.patch Patch119: autofs-5.1.6-simplify-sss-source-stale-check.patch
Patch120: autofs-5.1.6-fix-empty-mounts-list-return-from-unlink_mount_tree.patch
%if %{with_systemd} %if %{with_systemd}
BuildRequires: systemd-units BuildRequires: systemd-units
BuildRequires: systemd-devel BuildRequires: systemd-devel
@ -314,6 +316,8 @@ echo %{version}-%{release} > .version
%patch118 -p1 %patch118 -p1
%patch119 -p1 %patch119 -p1
%patch120 -p1
%build %build
LDFLAGS=-Wl,-z,now LDFLAGS=-Wl,-z,now
%configure --disable-mount-locking --enable-ignore-busy --with-libtirpc --without-hesiod %{?systemd_configure_arg:} %configure --disable-mount-locking --enable-ignore-busy --with-libtirpc --without-hesiod %{?systemd_configure_arg:}
@ -408,6 +412,12 @@ fi
%dir /etc/auto.master.d %dir /etc/auto.master.d
%changelog %changelog
* Mon Jun 21 2021 Ian Kent <ikent@redhat.com> - 5.1.4-48.el8_4.1
- bz1973888 - autofs: already mounted as other than autofs or failed to unlink
entry in tree
- fix empty mounts list return from unlink_mount_tree().
- Resolves: rhbz#1973888
* Fri Nov 27 2020 Ian Kent <ikent@redhat.com> - 5.1.4-48 * Fri Nov 27 2020 Ian Kent <ikent@redhat.com> - 5.1.4-48
- bz1892184 - autofs: return a connection failure until maps have been fetched - bz1892184 - autofs: return a connection failure until maps have been fetched
- fix lookup_nss_read_master() nsswicth check return. - fix lookup_nss_read_master() nsswicth check return.