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

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