]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: Check CAP_DAC_READ_SEARCH for BTRFS_IOC_INO_PATHS
authorKusanagi Kouichi <slash@ac.auone-net.jp>
Mon, 28 Jan 2013 11:33:31 +0000 (11:33 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 14:37:27 +0000 (09:37 -0500)
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>
fs/btrfs/ioctl.c

index 744aabf11ce5660031985fa643772e7685f5ad92..1b554b47e8146a9b59f7605cebe477af4944c189 100644 (file)
@@ -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();