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

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