|
|
ab3a3d |
autofs-5.0.7 - make dump maps check for duplicate indirect mounts
|
|
|
ab3a3d |
|
|
|
ab3a3d |
From: Ian Kent <raven@themaw.net>
|
|
|
ab3a3d |
|
|
|
ab3a3d |
The dumpmaps function was intended for users to find out how the configured
|
|
|
ab3a3d |
mounts would be seen by automount. It does a limited amount of checking and
|
|
|
ab3a3d |
in particular doesn't report that duplicate indirect map sources will be
|
|
|
ab3a3d |
ignored at runtime.
|
|
|
ab3a3d |
---
|
|
|
ab3a3d |
CHANGELOG | 1 +
|
|
|
ab3a3d |
lib/master.c | 7 +++++++
|
|
|
ab3a3d |
2 files changed, 8 insertions(+)
|
|
|
ab3a3d |
|
|
|
ab3a3d |
diff --git a/CHANGELOG b/CHANGELOG
|
|
|
ab3a3d |
index 4106e7f..4576d47 100644
|
|
|
ab3a3d |
--- a/CHANGELOG
|
|
|
ab3a3d |
+++ b/CHANGELOG
|
|
|
ab3a3d |
@@ -40,6 +40,7 @@
|
|
|
ab3a3d |
- fix some automount(8) typos.
|
|
|
ab3a3d |
- syncronize handle_mounts() shutdown.
|
|
|
ab3a3d |
- fix submount tree not all expiring.
|
|
|
ab3a3d |
+- make dump maps check for duplicate indirect mounts.
|
|
|
ab3a3d |
|
|
|
ab3a3d |
25/07/2012 autofs-5.0.7
|
|
|
ab3a3d |
=======================
|
|
|
ab3a3d |
diff --git a/lib/master.c b/lib/master.c
|
|
|
ab3a3d |
index 64dbcb1..eca3523 100644
|
|
|
ab3a3d |
--- a/lib/master.c
|
|
|
ab3a3d |
+++ b/lib/master.c
|
|
|
ab3a3d |
@@ -1310,6 +1310,7 @@ int master_show_mounts(struct master *master)
|
|
|
ab3a3d |
struct master_mapent *this;
|
|
|
ab3a3d |
struct autofs_point *ap;
|
|
|
ab3a3d |
time_t now = time(NULL);
|
|
|
ab3a3d |
+ unsigned int count = 0;
|
|
|
ab3a3d |
int i;
|
|
|
ab3a3d |
|
|
|
ab3a3d |
this = list_entry(p, struct master_mapent, list);
|
|
|
ab3a3d |
@@ -1318,6 +1319,7 @@ int master_show_mounts(struct master *master)
|
|
|
ab3a3d |
ap = this->ap;
|
|
|
ab3a3d |
|
|
|
ab3a3d |
printf("\nMount point: %s\n", ap->path);
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
printf("\nsource(s):\n");
|
|
|
ab3a3d |
|
|
|
ab3a3d |
/*
|
|
|
ab3a3d |
@@ -1360,6 +1362,9 @@ int master_show_mounts(struct master *master)
|
|
|
ab3a3d |
printf(" map: %s\n", source->argv[0]);
|
|
|
ab3a3d |
i = 1;
|
|
|
ab3a3d |
}
|
|
|
ab3a3d |
+ if (count && ap->type == LKP_INDIRECT)
|
|
|
ab3a3d |
+ printf(" duplicate indirect map entry"
|
|
|
ab3a3d |
+ " will be ignored at run time\n");
|
|
|
ab3a3d |
if (source->argc > 1) {
|
|
|
ab3a3d |
printf(" arguments: ");
|
|
|
ab3a3d |
for (; i < source->argc; i++)
|
|
|
ab3a3d |
@@ -1379,6 +1384,8 @@ int master_show_mounts(struct master *master)
|
|
|
ab3a3d |
} while ((me = cache_lookup_next(source->mc, me)));
|
|
|
ab3a3d |
}
|
|
|
ab3a3d |
|
|
|
ab3a3d |
+ count++;
|
|
|
ab3a3d |
+
|
|
|
ab3a3d |
source = source->next;
|
|
|
ab3a3d |
}
|
|
|
ab3a3d |
|