diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2010-02-10 06:15:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 14:08:00 -0500 |
commit | db1f05bb85d7966b9176e293f3ceead1cb8b5d79 (patch) | |
tree | 65a1d746f84cb8aa9be2a69c59eb627859b9fa0d /include/linux/fs.h | |
parent | 440b3c6c160f7d0a985f24ad1f4c24e00ee2d936 (diff) |
vfs: add NOFOLLOW flag to umount(2)
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>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index e764f247d0ab..5b3182c7eb5f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1305,6 +1305,8 @@ extern int send_sigurg(struct fown_struct *fown); | |||
1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ | 1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ |
1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ | 1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ |
1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ | 1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ |
1308 | #define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ | ||
1309 | #define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ | ||
1308 | 1310 | ||
1309 | extern struct list_head super_blocks; | 1311 | extern struct list_head super_blocks; |
1310 | extern spinlock_t sb_lock; | 1312 | extern spinlock_t sb_lock; |