Blame SOURCES/autofs-5.1.0-fix-fix-master-map-type-check.patch

306fa1
autofs-5.1.0 - fix fix master map type check
306fa1
306fa1
From: Ian Kent <ikent@redhat.com>
306fa1
306fa1
The map type is of the form <type>[,<format>] but the master map type
306fa1
check for the old style map syntax wasn't allowing for <format> to be
306fa1
given (see commit 7c104167).
306fa1
306fa1
When fixing this an incorrect length was accidently used when checking
306fa1
for the "yp" map type which causes it to never match.
306fa1
---
306fa1
 CHANGELOG       |    1 +
306fa1
 daemon/lookup.c |    4 ++--
306fa1
 2 files changed, 3 insertions(+), 2 deletions(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -156,6 +156,7 @@
306fa1
 - ignore multiple commas in options strings.
306fa1
 - clarify multiple mounts description.
306fa1
 - update man page autofs(8) for systemd.
306fa1
+- fix fix master map type check.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/daemon/lookup.c
306fa1
+++ autofs-5.0.7/daemon/lookup.c
306fa1
@@ -233,8 +233,8 @@ int lookup_nss_read_master(struct master
306fa1
 			memset(source, 0, 10);
306fa1
 			if ((!strncmp(name, "file", 4) &&
306fa1
 				 (name[4] == ',' || name[4] == ':')) ||
306fa1
-			    (!strncmp(name, "yp", 3) &&
306fa1
-				 (name[3] == ',' || name[3] == ':')) ||
306fa1
+			    (!strncmp(name, "yp", 2) &&
306fa1
+				 (name[2] == ',' || name[2] == ':')) ||
306fa1
 			    (!strncmp(name, "nis", 3) &&
306fa1
 				 (name[3] == ',' || name[3] == ':')) ||
306fa1
 			    (!strncmp(name, "nisplus", 7) &&