Skip to content

Commit

Permalink
Btrfs: Check CAP_DAC_READ_SEARCH for BTRFS_IOC_INO_PATHS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kusanagi Kouichi authored and Josef Bacik committed Feb 20, 2013
1 parent fe5fafb commit 82b22ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3290,7 +3290,7 @@ static long btrfs_ioctl_ino_to_path(struct btrfs_root *root, void __user *arg)
struct inode_fs_paths *ipath = NULL;
struct btrfs_path *path;

if (!capable(CAP_SYS_ADMIN))
if (!capable(CAP_DAC_READ_SEARCH))
return -EPERM;

path = btrfs_alloc_path();
Expand Down

0 comments on commit 82b22ac

Please sign in to comment.