From: Kusanagi Kouichi Date: Mon, 28 Jan 2013 11:33:31 +0000 (+0000) Subject: Btrfs: Check CAP_DAC_READ_SEARCH for BTRFS_IOC_INO_PATHS X-Git-Tag: v3.9-rc1~17^2~29^2~54 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=82b22ac8f651aebbf0149cbbbd5808f07753b09c;p=karo-tx-linux.git 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 Signed-off-by: Josef Bacik --- 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) 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();