diff options
author | Christian Brauner <brauner@kernel.org> | 2022-10-20 14:50:10 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-10-26 10:02:39 +0200 |
commit | b7c9b6751242fec703c1b7d1bcfea1d80fe00c8d (patch) | |
tree | 165dbac357be39293f25dab2f8c5df4e2849df60 /kernel/capability.c | |
parent | a2bd096fb2d7f50fb4db246b33e7bfcf5e2eda3a (diff) | |
download | lwn-b7c9b6751242fec703c1b7d1bcfea1d80fe00c8d.tar.gz lwn-b7c9b6751242fec703c1b7d1bcfea1d80fe00c8d.zip |
caps: use type safe idmapping helpers
We already ported most parts and filesystems over for v6.0 to the new
vfs{g,u}id_t type and associated helpers for v6.0. Convert the remaining
places so we can remove all the old helpers.
This is a non-functional change.
Reviewed-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'kernel/capability.c')
-rw-r--r-- | kernel/capability.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index 765194f5d678..860fd22117c1 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -489,8 +489,8 @@ bool privileged_wrt_inode_uidgid(struct user_namespace *ns, struct user_namespace *mnt_userns, const struct inode *inode) { - return kuid_has_mapping(ns, i_uid_into_mnt(mnt_userns, inode)) && - kgid_has_mapping(ns, i_gid_into_mnt(mnt_userns, inode)); + return vfsuid_has_mapping(ns, i_uid_into_vfsuid(mnt_userns, inode)) && + vfsgid_has_mapping(ns, i_gid_into_vfsgid(mnt_userns, inode)); } /** |