Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82b22ac8 authored by Kusanagi Kouichi's avatar Kusanagi Kouichi Committed by Josef Bacik
Browse files

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: default avatarKusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent fe5fafbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();