vfs: add NOFOLLOW flag to umount(2)
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 10 Feb 2010 11:15:53 +0000 (12:15 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:08:46 +0000 (11:08 -0700)
commit23b5e014564bb71eb05871af019912957263f158
treed7f1b2c484f6bcb0f44a6f89086f157f8001e7d0
parentb1b7bf1eede2a2d954dc0e4e7db6bb94e7650f60
vfs: add NOFOLLOW flag to umount(2)

commit db1f05bb85d7966b9176e293f3ceead1cb8b5d79 upstream.

Add a new UMOUNT_NOFOLLOW flag to umount(2).  This is needed to prevent
symlink attacks in unprivileged unmounts (fuse, samba, ncpfs).

Additionally, return -EINVAL if an unknown flag is used (and specify
an explicitly unused flag: UMOUNT_UNUSED).  This makes it possible for
the caller to determine if a flag is supported or not.

CC: Eugene Teo <eugene@redhat.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/namespace.c
include/linux/fs.h