Commit 20b73da5 authored by Seth Forshee's avatar Seth Forshee

quota: Treat superblock owner as privilged

A user privileged towards s_user_ns is privileged towards the
superblock and should be allowed to perform privileged quota
operations on that superblock. Convert check_quotactl_permission
to check for CAP_SYS_ADMIN in s_user_ns for these operations.
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
parent ba8a4f5b
...@@ -38,7 +38,7 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd, ...@@ -38,7 +38,7 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
break; break;
/*FALLTHROUGH*/ /*FALLTHROUGH*/
default: default:
if (!capable(CAP_SYS_ADMIN)) if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
} }
......
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