diff options
author | Ingo Molnar | 2021-12-13 10:48:46 +0100 |
---|---|---|
committer | Ingo Molnar | 2021-12-13 10:48:46 +0100 |
commit | 6773cc31a9bb5122fd5c288f73ca006ad20a6c17 (patch) | |
tree | 730ec8bcc0a5ddd5030268bb3ffd4945d34728c1 /fs/attr.c | |
parent | 0f09c274698590d508c43f924d9dffc7130b782d (diff) | |
parent | 2585cf9dfaaddf00b069673f27bb3f8530e2039c (diff) |
Merge tag 'v5.16-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/attr.c b/fs/attr.c index 473d21b3a86d..66899b6e9bd8 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -35,7 +35,7 @@ static bool chown_ok(struct user_namespace *mnt_userns, kuid_t uid) { kuid_t kuid = i_uid_into_mnt(mnt_userns, inode); - if (uid_eq(current_fsuid(), kuid) && uid_eq(uid, kuid)) + if (uid_eq(current_fsuid(), kuid) && uid_eq(uid, inode->i_uid)) return true; if (capable_wrt_inode_uidgid(mnt_userns, inode, CAP_CHOWN)) return true; @@ -62,7 +62,7 @@ static bool chgrp_ok(struct user_namespace *mnt_userns, { kgid_t kgid = i_gid_into_mnt(mnt_userns, inode); if (uid_eq(current_fsuid(), i_uid_into_mnt(mnt_userns, inode)) && - (in_group_p(gid) || gid_eq(gid, kgid))) + (in_group_p(gid) || gid_eq(gid, inode->i_gid))) return true; if (capable_wrt_inode_uidgid(mnt_userns, inode, CAP_CHOWN)) return true; |