Package: autofs Version: 4.1.3-8 Followup-For: Bug #128171
I think this wishlist item should actually be a bug. I have to apply the attached patch ever since I use kernels with bind mounts. The problem is that, for compatibility reasons, some of my symlinks point to other automounted directories, e.g.: wd :... exg :/fs/wd/exg/ And it's not easy nor always possible to rewrite the link to point to the file system directly (some NFS servers have problems with submounts, although, in theory, this would be solvable on the client side. It also doesn't work with local mounts, as it's not possible to point inside a non-mounted filesystem except by using symlinks). It's certainly a bug because it happens to work *sometimes* (i.e. when the other automounted directory was already mounted) and basically depends on which entry gets accessed first. I *did* talk to the upstream maintainer shortly after this was introduced, and was told that he will not make this an option (but so far, no technical reason why bind mounts are better are known to me, so I guess switching to symlinks is safe, as it's done per default on kernels not supporting bind mounts). However, because the upstream sources won't change, I guess it stays broken :) (but at least the problems and the workaround is documented in debians bts) An alternative, btw., would be to make bind mounts that point into automounted directories work, but I guess this is a basic limitation within autofs (no recursive mounts). -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (700, 'testing'), (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.11-rc2 Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) -- no debconf information
diff --new-file -ur autofs-4.1.3/debian/patches/999_disable_bind local-autofs-4.1.3/debian/patches/999_disable_bind --- autofs-4.1.3/debian/patches/999_disable_bind 1970-01-01 01:00:00.000000000 +0100 +++ local-autofs-4.1.3/debian/patches/999_disable_bind 2004-11-14 13:30:57.000000000 +0100 @@ -0,0 +1,22 @@ +diff -ruN autofs-4.1.3.orig/modules/mount_bind.c autofs-4.1.3/modules/mount_bind.c +--- autofs-4.1.3.orig/modules/mount_bind.c 2004-11-14 13:30:56.422151469 +0100 ++++ autofs-4.1.3/modules/mount_bind.c 2004-11-14 13:29:50.041021056 +0100 +@@ -61,18 +61,7 @@ + if (lstat(tmp1, &st1) == -1) + goto out; + +- err = spawnl(LOG_DEBUG, MOUNTED_LOCK, +- PATH_MOUNT, PATH_MOUNT, "-n", "--bind", tmp1, tmp2, NULL); +- +- if (err == 0 && +- lstat(tmp2, &st2) == 0 && +- st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino) { +- bind_works = 1; +- } +- + debug(MODPREFIX "bind_works = %d\n", bind_works); +- spawnl(LOG_DEBUG, MOUNTED_LOCK, +- PATH_UMOUNT, PATH_UMOUNT, "-n", tmp2, NULL); + + out: + rmdir(tmp2);