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

Commit 67f94d75 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: set pin_file under CAP_SYS_ADMIN



Android uses pin_file for uncrypt during OTA, and that should be managed by
CAP_SYS_ADMIN only.

Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 8b160a34
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2649,8 +2649,8 @@ static int f2fs_ioc_set_pin_file(struct file *filp, unsigned long arg)
	__u32 pin;
	int ret = 0;

	if (!inode_owner_or_capable(inode))
		return -EACCES;
	if (!capable(CAP_SYS_ADMIN))
		return -EPERM;

	if (get_user(pin, (__u32 __user *)arg))
		return -EFAULT;