Commit 412b16ef authored by Seth Forshee's avatar Seth Forshee Committed by Luis Henriques

(namespace) Revert "UBUNTU: SAUCE: fs: Refuse uid/gid changes which don't map into s_user_ns"

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

This reverts commit fe50b8ac in
order to apply the upstream version of the same patch.
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 813a6f60
...@@ -79,17 +79,6 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) ...@@ -79,17 +79,6 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr)
return error; return error;
} }
/*
* Verify that uid/gid changes are valid in the target namespace
* of the superblock. This cannot be overriden using ATTR_FORCE.
*/
if (ia_valid & ATTR_UID &&
from_kuid(inode->i_sb->s_user_ns, attr->ia_uid) == (uid_t)-1)
return -EOVERFLOW;
if (ia_valid & ATTR_GID &&
from_kgid(inode->i_sb->s_user_ns, attr->ia_gid) == (gid_t)-1)
return -EOVERFLOW;
/* If force is set do it anyway. */ /* If force is set do it anyway. */
if (ia_valid & ATTR_FORCE) if (ia_valid & ATTR_FORCE)
return 0; return 0;
......
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