Commit c6c8dc16 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Luis Henriques

(namespace) dquot: For now explicitly don't support filesystems outside of init_user_ns

BugLink: http://bugs.launchpad.net/bugs/1634964

Mostly supporting filesystems outside of init_user_ns is
s/&init_usre_ns/dquot->dq_sb->s_user_ns/.  An actual need for
supporting quotas on filesystems outside of s_user_ns is quite a ways
away and to be done responsibily needs an audit on what can happen
with hostile quota files.  Until that audit is complete don't attempt
to support quota files on filesystems outside of s_user_ns.

Cc: Jan Kara <jack@suse.cz>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
(cherry picked from commit 5c004828)
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 0beac1b4
...@@ -2234,6 +2234,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, ...@@ -2234,6 +2234,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
error = -EINVAL; error = -EINVAL;
goto out_fmt; goto out_fmt;
} }
/* Filesystems outside of init_user_ns not yet supported */
if (sb->s_user_ns != &init_user_ns) {
error = -EINVAL;
goto out_fmt;
}
/* Usage always has to be set... */ /* Usage always has to be set... */
if (!(flags & DQUOT_USAGE_ENABLED)) { if (!(flags & DQUOT_USAGE_ENABLED)) {
error = -EINVAL; error = -EINVAL;
......
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