diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2013-01-28 06:33:31 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 09:37:27 -0500 |
commit | 82b22ac8f651aebbf0149cbbbd5808f07753b09c (patch) | |
tree | e05ed50f2bba8279d397ea7dc87e65b7e6d5f83d /fs | |
parent | fe5fafbebd7e648aa6cb0a419dc812188b4d4ac8 (diff) |
Btrfs: Check CAP_DAC_READ_SEARCH for BTRFS_IOC_INO_PATHS
CAP_DAC_READ_SEARCH overrides read and search permission check on
file and directory. It seems fit for BTRFS_IOC_INO_PATHS.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 744aabf11ce5..1b554b47e814 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -3290,7 +3290,7 @@ static long btrfs_ioctl_ino_to_path(struct btrfs_root *root, void __user *arg) | |||
3290 | struct inode_fs_paths *ipath = NULL; | 3290 | struct inode_fs_paths *ipath = NULL; |
3291 | struct btrfs_path *path; | 3291 | struct btrfs_path *path; |
3292 | 3292 | ||
3293 | if (!capable(CAP_SYS_ADMIN)) | 3293 | if (!capable(CAP_DAC_READ_SEARCH)) |
3294 | return -EPERM; | 3294 | return -EPERM; |
3295 | 3295 | ||
3296 | path = btrfs_alloc_path(); | 3296 | path = btrfs_alloc_path(); |