|
|
306fa1 |
autofs-5.0.8 - fix master map type check
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <ikent@redhat.com>
|
|
|
306fa1 |
|
|
|
306fa1 |
Map type has format <type>[,<format>] but the master map type check
|
|
|
306fa1 |
for old style map syntax doesn't allow for <format>.
|
|
|
306fa1 |
---
|
|
|
306fa1 |
CHANGELOG | 1 +
|
|
|
306fa1 |
daemon/lookup.c | 24 ++++++++++++++++--------
|
|
|
306fa1 |
2 files changed, 17 insertions(+), 8 deletions(-)
|
|
|
306fa1 |
|
|
|
306fa1 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
306fa1 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
306fa1 |
@@ -87,6 +87,7 @@
|
|
|
306fa1 |
- pass map_source as function paramter where possible.
|
|
|
306fa1 |
- check for bind onto self in mount_bind.c.
|
|
|
306fa1 |
- fix symlink expire.
|
|
|
306fa1 |
+- 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 |
@@ -171,14 +171,22 @@ int lookup_nss_read_master(struct master
|
|
|
306fa1 |
char source[10];
|
|
|
306fa1 |
|
|
|
306fa1 |
memset(source, 0, 10);
|
|
|
306fa1 |
- if (!strncmp(name, "file:", 5) ||
|
|
|
306fa1 |
- !strncmp(name, "yp:", 3) ||
|
|
|
306fa1 |
- !strncmp(name, "nis:", 4) ||
|
|
|
306fa1 |
- !strncmp(name, "nisplus:", 8) ||
|
|
|
306fa1 |
- !strncmp(name, "ldap:", 5) ||
|
|
|
306fa1 |
- !strncmp(name, "ldaps:", 6) ||
|
|
|
306fa1 |
- !strncmp(name, "sss:", 4) ||
|
|
|
306fa1 |
- !strncmp(name, "dir:", 4)) {
|
|
|
306fa1 |
+ if ((!strncmp(name, "file", 4) &&
|
|
|
306fa1 |
+ (name[4] == ',' || name[4] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "yp", 3) &&
|
|
|
306fa1 |
+ (name[3] == ',' || name[3] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "nis", 3) &&
|
|
|
306fa1 |
+ (name[3] == ',' || name[3] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "nisplus", 7) &&
|
|
|
306fa1 |
+ (name[7] == ',' || name[7] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "ldap", 4) &&
|
|
|
306fa1 |
+ (name[4] == ',' || name[4] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "ldaps", 5) &&
|
|
|
306fa1 |
+ (name[5] == ',' || name[5] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "sss", 3) ||
|
|
|
306fa1 |
+ (name[3] == ',' || name[3] == ':')) ||
|
|
|
306fa1 |
+ (!strncmp(name, "dir", 3) &&
|
|
|
306fa1 |
+ (name[3] == ',' || name[3] == ':'))) {
|
|
|
306fa1 |
strncpy(source, name, tmp - name);
|
|
|
306fa1 |
|
|
|
306fa1 |
/*
|