- fix a mistake in a previous fix for master map type check.

This commit is contained in:
Ian Kent 2014-10-17 10:45:46 +08:00
parent 0e5314c98d
commit 76d55abef6
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,42 @@
autofs-5.1.0 - fix fix master map type check
From: Ian Kent <ikent@redhat.com>
The map type is of the form <type>[,<format>] but the master map type
check for the old style map syntax wasn't allowing for <format> 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) &&

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.0 Version: 5.1.0
Release: 7%{?dist} Release: 8%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons 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 Patch31: autofs-5.1.0-clarify-multiple-mounts-description.patch
Patch32: autofs-5.1.0-gaurd-against-incorrect-umount-return.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 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) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{with_systemd} %if %{with_systemd}
BuildRequires: systemd-units BuildRequires: systemd-units
@ -135,6 +136,7 @@ echo %{version}-%{release} > .version
%patch31 -p1 %patch31 -p1
%patch32 -p1 %patch32 -p1
%patch33 -p1 %patch33 -p1
%patch34 -p1
%build %build
LDFLAGS=-Wl,-z,now LDFLAGS=-Wl,-z,now
@ -227,6 +229,9 @@ fi
%dir /etc/auto.master.d %dir /etc/auto.master.d
%changelog %changelog
* Fri Oct 17 2014 Ian Kent <ikent@redhat.com> - 1:5.1.0-8
- fix fix master map type check.
* Wed Oct 15 2014 Ian Kent <ikent@redhat.com> - 1:5.1.0-7 * Wed Oct 15 2014 Ian Kent <ikent@redhat.com> - 1:5.1.0-7
- force disable browse mode for amd format maps. - force disable browse mode for amd format maps.
- fix hosts map options check in lookup_amd_instance(). - fix hosts map options check in lookup_amd_instance().