import autofs-5.1.4-71.el8

This commit is contained in:
CentOS Sources 2021-06-15 04:20:19 +00:00 committed by Andrew Lukoshko
parent cb3938c254
commit 9f778b55c1
4 changed files with 176 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
@@ -75,6 +75,7 @@
- fix direct mount deadlock.
- fix lookup_prune_one_cache() refactoring change.
- add missing description of null map option.
+- fix empty mounts list return from unlink_mount_tree().
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/lib/mounts.c
+++ autofs-5.1.4/lib/mounts.c
@@ -2115,9 +2115,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

@ -0,0 +1,51 @@
autofs-5.1.7 - add missing desciption of null map option
From: Ian Kent <raven@themaw.net>
The description of how the -null master map option behaves is
mising from auto.master(5).
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
man/auto.master.5.in | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -74,6 +74,7 @@
- fix hosts map offset order.
- fix direct mount deadlock.
- fix lookup_prune_one_cache() refactoring change.
+- add missing description of null map option.
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/man/auto.master.5.in
+++ autofs-5.1.4/man/auto.master.5.in
@@ -263,6 +263,25 @@ accessing /net/myserver will mount expor
NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev,intr" options
unless overridden by explicitly specifying the "suid", "dev" or "nointr" options in the
master map entry.
+.SH BUILTIN MAP \-null
+If "\-null" is given as the map it is used to tell automount(8) to ignore a subsequent
+master map entry with the given path.
+.P
+It can only be used for paths that appear in the master map (or in direct mount maps).
+.P
+An indirect mount map top level mount point path can be nulled. If so no mounts from
+the nulled mount are performed (essentially it isn't mounted).
+.P
+Direct mount map path entries can be nulled. Since they must be present at startup
+they are (notionally) part of the master map.
+.P
+A nulled master map entry path will ignore a single subsequent matching entry. Any
+matching entry following that will be treated as it normally would be. An example
+use of this is allowing local master map entries to override remote ones.
+.P
+NOTE: If a duplicate master map entry path is seen (excluding paths of null entries)
+it will be ignored and noted in the log, that is the first encountered master map
+entry is used unless there is a corresponding null entry.
.SH LDAP MAPS
If the map type \fBldap\fP is specified the mapname is of the form
\fB[//servername/]dn\fP, where the optional \fBservername\fP is

View File

@ -0,0 +1,56 @@
autofs-5.1.7 - fix lookup_prune_one_cache() refactoring change
From: Ian Kent <raven@themaw.net>
Commit 256963d6b (autofs-5.1.7 - refactor lookup_prune_one_cache() a bit)
changed the position of the getting the next enumeration map entry but
failed to update a couple of other locations that assume the next map
entry has been set. Under certain fairly common conditions this leads
to an infinite loop.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
daemon/lookup.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -73,6 +73,7 @@
- eliminate redundant cache lookup in tree_mapent_add_node().
- fix hosts map offset order.
- fix direct mount deadlock.
+- fix lookup_prune_one_cache() refactoring change.
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/daemon/lookup.c
+++ autofs-5.1.4/daemon/lookup.c
@@ -1387,6 +1387,7 @@ void lookup_prune_one_cache(struct autof
if (!key || strchr(key, '*')) {
if (key)
free(key);
+ me = cache_enumerate(mc, me);
continue;
}
@@ -1394,6 +1395,7 @@ void lookup_prune_one_cache(struct autof
if (!path) {
warn(ap->logopt, "can't malloc storage for path");
free(key);
+ me = cache_enumerate(mc, me);
continue;
}
@@ -1421,9 +1423,10 @@ void lookup_prune_one_cache(struct autof
}
if (!valid &&
is_mounted(path, MNTS_REAL)) {
- debug(ap->logopt, "prune posponed, %s mounted", path);
+ debug(ap->logopt, "prune postponed, %s mounted", path);
free(key);
free(path);
+ me = cache_enumerate(mc, me);
continue;
}
if (valid)

View File

@ -8,7 +8,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.1.4
Release: 69%{?dist}
Release: 71%{?dist}
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@ -240,6 +240,10 @@ Patch216: autofs-5.1.7-eliminate-redundant-cache-lookup-in-tree_mapent_add_node.
Patch217: autofs-5.1.7-fix-hosts-map-offset-order.patch
Patch218: autofs-5.1.7-fix-direct-mount-deadlock.patch
Patch219: autofs-5.1.7-fix-lookup_prune_one_cache-refactoring-change.patch
Patch220: autofs-5.1.7-add-missing-description-of-null-map-option.patch
Patch221: autofs-5.1.6-fix-empty-mounts-list-return-from-unlink_mount_tree.patch
%if %{with_systemd}
BuildRequires: systemd-units
BuildRequires: systemd-devel
@ -521,6 +525,10 @@ echo %{version}-%{release} > .version
%patch217 -p1
%patch218 -p1
%patch219 -p1
%patch220 -p1
%patch221 -p1
%build
LDFLAGS=-Wl,-z,now
%configure --disable-mount-locking --enable-ignore-busy --with-libtirpc --without-hesiod %{?systemd_configure_arg:}
@ -615,6 +623,19 @@ fi
%dir /etc/auto.master.d
%changelog
* Tue Jun 08 2021 Ian Kent <ikent@redhat.com> - 5.1.4-71
- bz1969210 - 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#1969210
* Tue Jun 01 2021 Ian Kent <ikent@redhat.com> - 5.1.4-70
- bz1965862 - A recent Coverity change can cause an infinit loop on map reload
- fix lookup_prune_one_cache() refactoring change.
- bz1963129 - auto.master manpage doesn't mention -null or other built-in maps
- add missing desciption of null map option.
- Resolves: rhbz#1965862 rhbz#1963129
* Wed May 19 2021 Ian Kent <ikent@redhat.com> - 5.1.4-69
- bz1961492 - autofs: regression in offset ordering
- fix offset entries order.