mirror of https://gitee.com/openkylin/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 <slash@ac.auone-net.jp> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
parent
fe5fafbebd
commit
82b22ac8f6
|
@ -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 inode_fs_paths *ipath = NULL;
|
||||||
struct btrfs_path *path;
|
struct btrfs_path *path;
|
||||||
|
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_DAC_READ_SEARCH))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
path = btrfs_alloc_path();
|
path = btrfs_alloc_path();
|
||||||
|
|
Loading…
Reference in New Issue