From 7d88f36f860173325cfdbea7d327e537816b03e6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 09 2020 19:16:30 +0000 Subject: import autofs-5.1.4-41.el8 --- 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..1225c1e --- /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.1.4.orig/CHANGELOG ++++ autofs-5.1.4/CHANGELOG +@@ -77,6 +77,7 @@ xx/xx/2018 autofs-5.1.5 + - use local getmntent_r() in tree_make_mnt_list(). + - fix missing initialization of autofs_point flags. + - fix a regression with map instance lookup. ++- fix trailing dollar sun entry expansion. + + 19/12/2017 autofs-5.1.4 + - fix spec file url. +--- autofs-5.1.4.orig/modules/parse_sun.c ++++ autofs-5.1.4/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 (isblank(*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 1cea249..e383ab9 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.1.4 -Release: 40%{?dist} +Release: 41%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -96,6 +96,8 @@ Patch82: autofs-5.1.5-fix-missing-initialization-of-autofs_point-flags.patch Patch83: autofs-5.1.6-update-ldap-READMEs-and-schema-definitions.patch Patch84: autofs-5.1.6-fix-a-regression-with-map-instance-lookup.patch +Patch85: autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch + %if %{with_systemd} BuildRequires: systemd-units BuildRequires: systemd-devel @@ -238,6 +240,8 @@ echo %{version}-%{release} > .version %patch83 -p1 %patch84 -p1 +%patch85 -p1 + %build LDFLAGS=-Wl,-z,now %configure --disable-mount-locking --enable-ignore-busy --with-libtirpc --without-hesiod %{?systemd_configure_arg:} @@ -332,6 +336,12 @@ fi %dir /etc/auto.master.d %changelog +* Mon May 18 2020 Ian Kent - 5.1.4-41 +- bz1835547 - [RHEL8]autofs cannot mount samba/cifs shares that end with a + dollar sign + - fix trailing dollar sun entry expansion. +- Resolves: rhbz#1835547 + * Fri Feb 21 2020 Ian Kent - 5.1.4-40 - fix incorrect changelog entry for bug 1802251. - Related: rhbz#1802251