Blame SOURCES/autofs-5.0.9-amd-lookup-skip-sss-source-for-amd-lookups.patch

6bbd11
autofs-5.0.9 - amd-lookup skip sss source for amd lookups
6bbd11
6bbd11
From: Ian Kent <raven@themaw.net>
6bbd11
6bbd11
Looks like we won't be able to provide sss as a map source for
6bbd11
amd maps. There's no way to tell sss to use a different schema
6bbd11
for different map formats.
6bbd11
---
6bbd11
 daemon/lookup.c |   14 ++++++++++++++
6bbd11
 1 file changed, 14 insertions(+)
6bbd11
6bbd11
--- autofs-5.0.7.orig/daemon/lookup.c
6bbd11
+++ autofs-5.0.7/daemon/lookup.c
6bbd11
@@ -636,6 +636,13 @@ int lookup_nss_read_map(struct autofs_po
6bbd11
 		list_for_each(p, head) {
6bbd11
 			this = list_entry(p, struct nss_source, list);
6bbd11
 
6bbd11
+			if (map->flags & MAP_FLAG_FORMAT_AMD &&
6bbd11
+			    !strcmp(this->source, "sss")) {
6bbd11
+				warn(ap->logopt,
6bbd11
+				     "source sss is not available for amd maps.");
6bbd11
+				continue;
6bbd11
+			}
6bbd11
+
6bbd11
 			debug(ap->logopt,
6bbd11
 			      "reading map %s %s", this->source, map->argv[0]);
6bbd11
 
6bbd11
@@ -1164,6 +1171,13 @@ int lookup_nss_mount(struct autofs_point
6bbd11
 		list_for_each(p, head) {
6bbd11
 			this = list_entry(p, struct nss_source, list);
6bbd11
 
6bbd11
+			if (map->flags & MAP_FLAG_FORMAT_AMD &&
6bbd11
+			    !strcmp(this->source, "sss")) {
6bbd11
+				warn(ap->logopt,
6bbd11
+				     "source sss is not available for amd maps.");
6bbd11
+				continue;
6bbd11
+			}
6bbd11
+
6bbd11
 			result = lookup_map_name(this, ap, map, name, name_len);
6bbd11
 
6bbd11
 			if (result == NSS_STATUS_UNKNOWN)