|
Ian Kent |
ca38f0 |
autofs-5.0.6 - fix dumpmaps not reading maps
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
From: Ian Kent <raven@themaw.net>
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
The lookup modules won't read any indirect map entries (other than those
|
|
Ian Kent |
ca38f0 |
in a file map) unless unless the browse option is set. In order to list
|
|
Ian Kent |
ca38f0 |
the entries when tyhe dumpmap option is given the browse option needs to
|
|
Ian Kent |
ca38f0 |
be set.
|
|
Ian Kent |
ca38f0 |
---
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
CHANGELOG | 1 +
|
|
Ian Kent |
ca38f0 |
lib/master.c | 9 +++++++++
|
|
Ian Kent |
ca38f0 |
2 files changed, 10 insertions(+), 0 deletions(-)
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
diff --git a/CHANGELOG b/CHANGELOG
|
|
Ian Kent |
ca38f0 |
index 884a9ae..946a196 100644
|
|
Ian Kent |
ca38f0 |
--- a/CHANGELOG
|
|
Ian Kent |
ca38f0 |
+++ b/CHANGELOG
|
|
Ian Kent |
ca38f0 |
@@ -3,6 +3,7 @@
|
|
Ian Kent |
ca38f0 |
- fix ipv6 name for lookup fix.
|
|
Ian Kent |
ca38f0 |
- improve mount location error reporting.
|
|
Ian Kent |
ca38f0 |
- fix paged query more results check.
|
|
Ian Kent |
ca38f0 |
+- fix dumpmaps not reading maps.
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
28/06/2011 autofs-5.0.6
|
|
Ian Kent |
ca38f0 |
-----------------------
|
|
Ian Kent |
ca38f0 |
diff --git a/lib/master.c b/lib/master.c
|
|
Ian Kent |
ca38f0 |
index 153a38b..6c89e1d 100644
|
|
Ian Kent |
ca38f0 |
--- a/lib/master.c
|
|
Ian Kent |
ca38f0 |
+++ b/lib/master.c
|
|
Ian Kent |
ca38f0 |
@@ -1283,6 +1283,15 @@ int master_show_mounts(struct master *master)
|
|
Ian Kent |
ca38f0 |
printf("\nMount point: %s\n", ap->path);
|
|
Ian Kent |
ca38f0 |
printf("\nsource(s):\n");
|
|
Ian Kent |
ca38f0 |
|
|
Ian Kent |
ca38f0 |
+ /*
|
|
Ian Kent |
ca38f0 |
+ * Ensure we actually read indirect map entries so we can
|
|
Ian Kent |
ca38f0 |
+ * list them. The map reads won't read any indirect map
|
|
Ian Kent |
ca38f0 |
+ * entries (other than those in a file map) unless the
|
|
Ian Kent |
ca38f0 |
+ * browse option is set.
|
|
Ian Kent |
ca38f0 |
+ */
|
|
Ian Kent |
ca38f0 |
+ if (ap->type == LKP_INDIRECT)
|
|
Ian Kent |
ca38f0 |
+ ap->flags |= MOUNT_FLAG_GHOST;
|
|
Ian Kent |
ca38f0 |
+
|
|
Ian Kent |
ca38f0 |
/* Read the map content into the cache */
|
|
Ian Kent |
ca38f0 |
if (lookup_nss_read_map(ap, NULL, now))
|
|
Ian Kent |
ca38f0 |
lookup_prune_cache(ap, now);
|