The current entry which ends up in /proc/mounts for autofs entries
looks like:
automount /home autofs rw,fd=170,......
Other autofs implementations (Solaris, Irix, OSF1, ...) have the
map-name which is being used as the first token.
The attached patch to daemon/indirect.c adds this (for indirect maps - I
don't have any other kind...).
The result is lines like:
auto.home /home autofs rw,fd=170,......
This does means that kernel mount entries (eg: those added under
SElinux?) need to ignore the device name passed in, but they should be
doing that for autofs file systems anyway.
NOTE: The ap->entry->first->argv[0] seems a contrived way to get a map
name, but is all I could see looking through the code.
--- daemon/indirect.c.orig 2006-11-10 10:29:18.716266000 +0000
+++ daemon/indirect.c 2006-11-10 10:06:21.726654000 +0000
@@ -183,7 +183,11 @@
ap->dir_created = 1;
}
+/* GML - Enhancement
+ * Put map name into /proc/mounts, as Solaris, Irix, OSF1, do
ret = mount("automount", ap->path, "autofs", MS_MGC_VAL, options);
+ */
+ ret = mount(ap->entry->first->argv[0], ap->path, "autofs", MS_MGC_VAL,
options);
if (ret) {
crit(ap->logopt, "failed to mount autofs path %s", ap->path);
goto out_rmdir;
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs