Revert "FROMLIST: configfs: make directories inherit uid/gid from creator"
This reverts commit 311e1c831c.
Reason for revert: uapi impacting changes can't be FROMLIST
Change-Id: I1d793178ab9a529f1be15a14c7e268e3e3953263
This commit is contained in:
@@ -1384,22 +1384,6 @@ static int configfs_mkdir(struct user_namespace *mnt_userns, struct inode *dir,
|
|||||||
else
|
else
|
||||||
ret = configfs_attach_item(parent_item, item, dentry, frag);
|
ret = configfs_attach_item(parent_item, item, dentry, frag);
|
||||||
|
|
||||||
/* inherit uid/gid from process creating the directory */
|
|
||||||
if (!uid_eq(current_fsuid(), GLOBAL_ROOT_UID) ||
|
|
||||||
!gid_eq(current_fsgid(), GLOBAL_ROOT_GID)) {
|
|
||||||
struct inode *inode = d_inode(dentry);
|
|
||||||
struct iattr ia = {
|
|
||||||
.ia_uid = current_fsuid(),
|
|
||||||
.ia_gid = current_fsgid(),
|
|
||||||
.ia_valid = ATTR_UID | ATTR_GID,
|
|
||||||
};
|
|
||||||
|
|
||||||
inode->i_uid = ia.ia_uid;
|
|
||||||
inode->i_gid = ia.ia_gid;
|
|
||||||
/* the above manual assignments skip the permission checks */
|
|
||||||
configfs_setattr(mnt_userns, dentry, &ia);
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock(&configfs_dirent_lock);
|
spin_lock(&configfs_dirent_lock);
|
||||||
sd->s_type &= ~CONFIGFS_USET_IN_MKDIR;
|
sd->s_type &= ~CONFIGFS_USET_IN_MKDIR;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
|||||||
Reference in New Issue
Block a user