From e1fdcaf245aab86a6bfc1d8ff3bdce2907ef1dbe Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2020 13:49:21 +0000 Subject: import autofs-5.0.7-113.el7 --- diff --git a/SOURCES/autofs-5.1.5-also-use-strictexpire-for-offsets.patch b/SOURCES/autofs-5.1.5-also-use-strictexpire-for-offsets.patch new file mode 100644 index 0000000..cd4c2dd --- /dev/null +++ b/SOURCES/autofs-5.1.5-also-use-strictexpire-for-offsets.patch @@ -0,0 +1,42 @@ +autofs-5.1.5 - also use strictexpire for offsets + +From: Ian Kent + +Map entries with offsets should use the "strictexpire" option when +mounting offsets if the option is set for the owner mount. + +Signed-off-by: Ian Kent +--- + CHANGELOG | 1 + + daemon/direct.c | 10 ++++++++++ + 2 files changed, 11 insertions(+) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -350,6 +350,7 @@ + - use local getmntent_r() in get_mnt_list(). + - use local getmntent_r() in tree_make_mnt_list(). + - fix missing initialization of autofs_point flags. ++- also use strictexpire for offsets. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/daemon/direct.c ++++ autofs-5.0.7/daemon/direct.c +@@ -685,6 +685,16 @@ int mount_autofs_offset(struct autofs_po + mp->options = make_options_string(ap->path, ap->kpipefd, str_offset); + if (!mp->options) + return MOUNT_OFFSET_OK; ++ ++ if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) && ++ ((get_kver_major() == 5 && get_kver_minor() > 3) || ++ (get_kver_major() > 5))) { ++ char *tmp = realloc(mp->options, strlen(mp->options) + 12); ++ if (tmp) { ++ strcat(tmp, ",strictexpire"); ++ mp->options = tmp; ++ } ++ } + } + + strcpy(mountpoint, root); diff --git a/SOURCES/autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch b/SOURCES/autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch new file mode 100644 index 0000000..9fe87bd --- /dev/null +++ b/SOURCES/autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch @@ -0,0 +1,46 @@ +autofs-5.1.6 - fix trailing dollar sun entry expansion + +From: Ian Kent + +In modules/parse_sun.c:expandsunent() if we see "$ " or "$" in a +the entry it can't be a macro, and the value can't be quoted since '\' +and '"' cases are handled seperately in the swicth, so treat the +character as a valid entry character. + +Signed-off-by: Ian Kent +--- + CHANGELOG | 1 + + modules/parse_sun.c | 12 ++++++++++++ + 2 files changed, 13 insertions(+) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -351,6 +351,7 @@ + - use local getmntent_r() in tree_make_mnt_list(). + - fix missing initialization of autofs_point flags. + - also use strictexpire for offsets. ++- fix trailing dollar sun entry expansion. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/modules/parse_sun.c ++++ autofs-5.0.7/modules/parse_sun.c +@@ -161,6 +161,18 @@ int expandsunent(const char *src, char * + } + src = p + 1; + } else { ++ /* If the '$' is folloed by a space or NULL it ++ * can't be a macro, and the value can't be ++ * quoted since '\' and '"' cases are handled ++ * in other cases, so treat the $ as a valid ++ * map entry character. ++ */ ++ if (*src == ' ' || !*src) { ++ if (dst) ++ *dst++ = ch; ++ len++; ++ break; ++ } + p = src; + while (isalnum(*p) || *p == '_') + p++; diff --git a/SPECS/autofs.spec b/SPECS/autofs.spec index 97c14de..ca6f07e 100644 --- a/SPECS/autofs.spec +++ b/SPECS/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.7 -Release: 109%{?dist} +Release: 113%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -519,6 +519,9 @@ Patch918: autofs-5.1.5-use-local-getmntent_r-in-get_mnt_list.patch Patch919: autofs-5.1.5-use-local-getmntent_r-in-tree_get_mnt_list.patch Patch920: autofs-5.1.5-fix-missing-initialization-of-autofs_point-flags.patch +Patch921: autofs-5.1.5-also-use-strictexpire-for-offsets.patch +Patch922: autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch + Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -1076,6 +1079,9 @@ echo %{version}-%{release} > .version %patch919 -p1 %patch920 -p1 +%patch921 -p1 +%patch922 -p1 + %build LDFLAGS=-Wl,-z,now %configure --disable-mount-locking \ @@ -1172,6 +1178,25 @@ fi %dir /etc/auto.master.d %changelog +* Mon Mar 30 2020 Ian Kent - 5.0.7-113 +- Fix changelog revision for previous 2 commits. +- Related: rhbz#1806514 rhbz#1818664 + +* Mon Mar 30 2020 Ian Kent - 5.0.7-112 +- bz1818664 - autofs cannot mount samba/cifs shares that end with a dollar sign + - fix trailing dollar sun entry expansion. +- Resolves: rhbz#1818664 + +* Wed Mar 25 2020 Ian Kent - 5.0.7-111 +- bz1806514 - strictexpire option not set for offset mounts + - fix patch not applied. +- Related: rhbz#1806514 + +* Wed Mar 25 2020 Ian Kent - 5.0.7-110 +- bz1806514 - strictexpire option not set for offset mounts + - also use strictexpire for offsets. +- Resolves: rhbz#1806514 + * Tue Aug 20 2019 Ian Kent - 5.0.7-109 - bz1728914 - getmntent returns additional "-hosts" entries when automounter is used with "hosts" map