Commit ba8a4f5b authored by Seth Forshee's avatar Seth Forshee

fs: Permit FIBMAP for users with CAP_SYS_RAWIO in s_user_ns

Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
parent 0ab933a0
......@@ -55,7 +55,7 @@ static int ioctl_fibmap(struct file *filp, int __user *p)
/* do we support this mess? */
if (!mapping->a_ops->bmap)
return -EINVAL;
if (!capable(CAP_SYS_RAWIO))
if (!ns_capable(filp->f_inode->i_sb->s_user_ns, CAP_SYS_RAWIO))
return -EPERM;
res = get_user(block, p);
if (res)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment