From 76d55abef6b72e6e3012de3f39e93bf7cfecaa9d Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Fri, 17 Oct 2014 10:45:46 +0800 Subject: [PATCH] - fix a mistake in a previous fix for master map type check. --- ...-5.1.0-fix-fix-master-map-type-check.patch | 42 +++++++++++++++++++ autofs.spec | 7 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 autofs-5.1.0-fix-fix-master-map-type-check.patch diff --git a/autofs-5.1.0-fix-fix-master-map-type-check.patch b/autofs-5.1.0-fix-fix-master-map-type-check.patch new file mode 100644 index 0000000..3e1c981 --- /dev/null +++ b/autofs-5.1.0-fix-fix-master-map-type-check.patch @@ -0,0 +1,42 @@ +autofs-5.1.0 - fix fix master map type check + +From: Ian Kent + +The map type is of the form [,] but the master map type +check for the old style map syntax wasn't allowing for to be +given (see commit 7c104167). + +When fixing this an incorrect length was accidently used when checking +for the "yp" map type which causes it to never match. +--- + CHANGELOG | 1 + + daemon/lookup.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CHANGELOG b/CHANGELOG +index b0dce1e..9e2dc89 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -33,6 +33,7 @@ + - clarify multiple mounts description. + - gaurd against incorrect umount return. + - update man page autofs(8) for systemd. ++- fix fix master map type check. + + 04/06/2014 autofs-5.1.0 + ======================= +diff --git a/daemon/lookup.c b/daemon/lookup.c +index 1a0881f..6444fa5 100644 +--- a/daemon/lookup.c ++++ b/daemon/lookup.c +@@ -233,8 +233,8 @@ int lookup_nss_read_master(struct master *master, time_t age) + memset(source, 0, 10); + if ((!strncmp(name, "file", 4) && + (name[4] == ',' || name[4] == ':')) || +- (!strncmp(name, "yp", 3) && +- (name[3] == ',' || name[3] == ':')) || ++ (!strncmp(name, "yp", 2) && ++ (name[2] == ',' || name[2] == ':')) || + (!strncmp(name, "nis", 3) && + (name[3] == ',' || name[3] == ':')) || + (!strncmp(name, "nisplus", 7) && diff --git a/autofs.spec b/autofs.spec index 2a590f6..b401797 100644 --- a/autofs.spec +++ b/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.1.0 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -46,6 +46,7 @@ Patch30: autofs-5.1.0-fix-typo-in-flagdir-configure-option.patch Patch31: autofs-5.1.0-clarify-multiple-mounts-description.patch Patch32: autofs-5.1.0-gaurd-against-incorrect-umount-return.patch Patch33: autofs-5.1.0-update-man-page-autofs-8-for-systemd.patch +Patch34: autofs-5.1.0-fix-fix-master-map-type-check.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -135,6 +136,7 @@ echo %{version}-%{release} > .version %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 %build LDFLAGS=-Wl,-z,now @@ -227,6 +229,9 @@ fi %dir /etc/auto.master.d %changelog +* Fri Oct 17 2014 Ian Kent - 1:5.1.0-8 +- fix fix master map type check. + * Wed Oct 15 2014 Ian Kent - 1:5.1.0-7 - force disable browse mode for amd format maps. - fix hosts map options check in lookup_amd_instance().