Blame SOURCES/autofs-5.1.3-fix-symlink-false-negative-in-umount_multi.patch

603f99
autofs-5.1.3 - fix symlink false negative in umount_multi()
603f99
603f99
From: Ian Kent <raven@themaw.net>
603f99
603f99
Using is_mounted() on a symlink will give a false negative for MNTS_ALL
603f99
since the kernel will return mounted true for a dentry within an autofs
603f99
mount point.
603f99
603f99
Just remove the check and rely on lstat().
603f99
603f99
Signed-off-by: Ian Kent <raven@themaw.net>
603f99
---
603f99
 CHANGELOG          |    1 +
603f99
 daemon/automount.c |    5 -----
603f99
 2 files changed, 1 insertion(+), 5 deletions(-)
603f99
603f99
--- autofs-5.0.7.orig/CHANGELOG
603f99
+++ autofs-5.0.7/CHANGELOG
603f99
@@ -270,6 +270,7 @@
603f99
 - fix cachefs parse message not being logged.
603f99
 - fix typo in amd_parse.c.
603f99
 - add missing MODPREFIX to logging in amd parser.
603f99
+- fix symlink false negative in umount_multi().
603f99
 
603f99
 25/07/2012 autofs-5.0.7
603f99
 =======================
603f99
--- autofs-5.0.7.orig/daemon/automount.c
603f99
+++ autofs-5.0.7/daemon/automount.c
603f99
@@ -640,10 +640,6 @@ int umount_multi(struct autofs_point *ap
603f99
 
603f99
 	debug(ap->logopt, "path %s incl %d", path, incl);
603f99
 
603f99
-	/* If path is a mount it can't be a symlink */
603f99
-	if (is_mounted(_PATH_MOUNTED, path, MNTS_ALL))
603f99
-		goto real_mount;
603f99
-
603f99
 	if (lstat(path, &st)) {
603f99
 		warn(ap->logopt,
603f99
 		     "failed to stat directory or symlink %s", path);
603f99
@@ -688,7 +684,6 @@ int umount_multi(struct autofs_point *ap
603f99
 		return 0;
603f99
 	}
603f99
 
603f99
-real_mount:
603f99
 	is_autofs_fs = 0;
603f99
 	if (master_find_submount(ap, path))
603f99
 		is_autofs_fs = 1;