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

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