autofs-5.1.3 - fix symlink false negative in umount_multi() From: Ian Kent Using is_mounted() on a symlink will give a false negative for MNTS_ALL since the kernel will return mounted true for a dentry within an autofs mount point. Just remove the check and rely on lstat(). Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d6016984..df87df49 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -45,6 +45,7 @@ xx/xx/2017 autofs-5.1.4 - improve debug logging of lookup key. - fix typo in amd_parse.c. - add missing MODPREFIX to logging in amd parser. +- fix symlink false negative in umount_multi(). 24/05/2017 autofs-5.1.3 ======================= diff --git a/daemon/automount.c b/daemon/automount.c index 5c1481c4..3ff4f778 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -633,10 +633,6 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl) debug(ap->logopt, "path %s incl %d", path, incl); - /* If path is a mount it can't be a symlink */ - if (is_mounted(_PATH_MOUNTED, path, MNTS_ALL)) - goto real_mount; - if (lstat(path, &st)) { warn(ap->logopt, "failed to stat directory or symlink %s", path); @@ -681,7 +677,6 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl) return 0; } -real_mount: is_autofs_fs = 0; if (master_find_submount(ap, path)) is_autofs_fs = 1;