File autofs-5.0.6-fix-dumpmaps-not-reading-maps.patch of Package autofs.import5769

commit 597702e403533dc546b8d4bca126fe7f1b6f3c08
Author: Ian Kent <raven@themaw.net>
Date:   Thu Dec 1 14:54:13 2011 +0800

    autofs-5.0.6 - fix dumpmaps not reading maps
    
    The lookup modules won't read any indirect map entries (other than those
    in a file map) unless unless the browse option is set. In order to list
    the entries when tyhe dumpmap option is given the browse option needs to
    be set.

Index: autofs-5.0.5/CHANGELOG
===================================================================
--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -81,6 +81,7 @@
 - fix libtirpc ipv6 check.
 - fix ipv6 name for lookup fix.
 - fix paged query more results check.
+- fix dumpmaps not reading maps.
 
 03/09/2009 autofs-5.0.5
 -----------------------
Index: autofs-5.0.5/lib/master.c
===================================================================
--- autofs-5.0.5.orig/lib/master.c
+++ autofs-5.0.5/lib/master.c
@@ -1279,6 +1279,15 @@ int master_show_mounts(struct master *ma
 		printf("\nMount point: %s\n", ap->path);
 		printf("\nsource(s):\n");
 
+		/*
+		 * Ensure we actually read indirect map entries so we can
+		 * list them. The map reads won't read any indirect map
+		 * entries (other than those in a file map) unless the
+		 * browse option is set.
+		 */
+		if (ap->type == LKP_INDIRECT)
+			ap->flags |= MOUNT_FLAG_GHOST;
+
 		/* Read the map content into the cache */
 		if (lookup_nss_read_map(ap, NULL, now))
 			lookup_prune_cache(ap, now);
openSUSE Build Service is sponsored by