/linux-6.3-rc2/include/linux/ |
A D | mnt_idmapping.h | 94 static inline bool vfsgid_eq_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_eq_kgid() argument 96 return vfsgid_valid(vfsgid) && __vfsgid_val(vfsgid) == __kgid_val(kgid); in vfsgid_eq_kgid() 116 int vfsgid_in_group_p(vfsgid_t vfsgid); 128 struct user_namespace *fs_userns, vfsgid_t vfsgid); 182 vfsgid_t vfsgid) in vfsgid_has_fsmapping() argument 184 return gid_valid(from_vfsgid(idmap, fs_userns, vfsgid)); in vfsgid_has_fsmapping() 188 vfsgid_t vfsgid) in vfsgid_has_mapping() argument 190 return from_kgid(userns, AS_KGIDT(vfsgid)) != (gid_t)-1; in vfsgid_has_mapping() 201 static inline kgid_t vfsgid_into_kgid(vfsgid_t vfsgid) in vfsgid_into_kgid() argument 203 return AS_KGIDT(vfsgid); in vfsgid_into_kgid()
|
/linux-6.3-rc2/fs/ |
A D | mnt_idmapping.c | 193 struct user_namespace *fs_userns, vfsgid_t vfsgid) in from_vfsgid() argument 199 return AS_KGIDT(vfsgid); in from_vfsgid() 200 gid = from_kgid(mnt_userns, AS_KGIDT(vfsgid)); in from_vfsgid() 219 int vfsgid_in_group_p(vfsgid_t vfsgid) in vfsgid_in_group_p() argument 221 return in_group_p(AS_KGIDT(vfsgid)); in vfsgid_in_group_p() 224 int vfsgid_in_group_p(vfsgid_t vfsgid) in vfsgid_in_group_p() argument
|
A D | attr.c | 127 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in chgrp_ok() local 130 if (vfsgid_eq(ia_vfsgid, vfsgid)) in chgrp_ok() 137 if (!vfsgid_valid(vfsgid) && in chgrp_ok() 196 vfsgid_t vfsgid; in setattr_prepare() local 202 vfsgid = attr->ia_vfsgid; in setattr_prepare() 204 vfsgid = i_gid_into_vfsgid(idmap, inode); in setattr_prepare() 207 if (!in_group_or_capable(idmap, inode, vfsgid)) in setattr_prepare()
|
A D | posix_acl.c | 383 vfsgid_t vfsgid; in posix_acl_permission() local 402 vfsgid = i_gid_into_vfsgid(idmap, inode); in posix_acl_permission() 403 if (vfsgid_in_group_p(vfsgid)) { in posix_acl_permission() 410 vfsgid = make_vfsgid(idmap, fs_userns, in posix_acl_permission() 412 if (vfsgid_in_group_p(vfsgid)) { in posix_acl_permission() 899 vfsgid_t vfsgid; in vfs_posix_acl_to_xattr() local 923 vfsgid = make_vfsgid(idmap, fs_userns, acl_e->e_gid); in vfs_posix_acl_to_xattr() 925 caller_userns, vfsgid_into_kgid(vfsgid))); in vfs_posix_acl_to_xattr()
|
A D | internal.h | 156 const struct inode *inode, vfsgid_t vfsgid);
|
A D | exec.c | 1604 vfsgid_t vfsgid; in bprm_fill_uid() local 1624 vfsgid = i_gid_into_vfsgid(idmap, inode); in bprm_fill_uid() 1629 !vfsgid_has_mapping(bprm->cred->user_ns, vfsgid)) in bprm_fill_uid() 1639 bprm->cred->egid = vfsgid_into_kgid(vfsgid); in bprm_fill_uid()
|
A D | stat.c | 49 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in generic_fillattr() local 56 stat->gid = vfsgid_into_kgid(vfsgid); in generic_fillattr()
|
A D | inode.c | 2473 const struct inode *inode, vfsgid_t vfsgid) in in_group_or_capable() argument 2475 if (vfsgid_in_group_p(vfsgid)) in in_group_or_capable()
|
A D | namei.c | 366 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in acl_permission_check() local 367 if (vfsgid_in_group_p(vfsgid)) in acl_permission_check()
|
/linux-6.3-rc2/fs/ksmbd/ |
A D | smbacl.h | 229 vfsgid_t vfsgid; in posix_acl_gid_translate() local 232 vfsgid = make_vfsgid(idmap, &init_user_ns, pace->e_gid); in posix_acl_gid_translate() 235 return from_kgid(&init_user_ns, vfsgid_into_kgid(vfsgid)); in posix_acl_gid_translate()
|
A D | ndr.c | 349 vfsgid_t vfsgid; in ndr_encode_posix_acl() local 381 vfsgid = i_gid_into_vfsgid(idmap, inode); in ndr_encode_posix_acl() 382 ret = ndr_write_int64(n, from_kgid(&init_user_ns, vfsgid_into_kgid(vfsgid))); in ndr_encode_posix_acl()
|
A D | oplock.c | 1613 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in create_posix_rsp_buf() local 1657 id_to_sid(from_kgid_munged(&init_user_ns, vfsgid_into_kgid(vfsgid)), in create_posix_rsp_buf()
|
A D | smb2pdu.c | 2467 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in ksmbd_acls_fattr() local 2470 fattr->cf_gid = vfsgid_into_kgid(vfsgid); in ksmbd_acls_fattr() 4711 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in find_file_posix_info() local 4738 id_to_sid(from_kgid_munged(&init_user_ns, vfsgid_into_kgid(vfsgid)), in find_file_posix_info()
|
/linux-6.3-rc2/fs/xfs/ |
A D | xfs_itable.c | 70 vfsgid_t vfsgid; in xfs_bulkstat_one_int() local 87 vfsgid = i_gid_into_vfsgid(idmap, inode); in xfs_bulkstat_one_int() 95 buf->bs_gid = from_kgid(sb_userns, vfsgid_into_kgid(vfsgid)); in xfs_bulkstat_one_int()
|
A D | xfs_iops.c | 561 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in xfs_vn_getattr() local 573 stat->gid = vfsgid_into_kgid(vfsgid); in xfs_vn_getattr()
|
/linux-6.3-rc2/fs/overlayfs/ |
A D | util.c | 1106 vfsgid_t vfsgid; in ovl_copyattr() local 1113 vfsgid = i_gid_into_vfsgid(real_idmap, realinode); in ovl_copyattr() 1116 inode->i_gid = vfsgid_into_kgid(vfsgid); in ovl_copyattr()
|
A D | inode.c | 473 vfsgid_t vfsgid; in ovl_idmap_posix_acl() local 482 vfsgid = make_vfsgid(idmap, fs_userns, e->e_gid); in ovl_idmap_posix_acl() 483 e->e_gid = vfsgid_into_kgid(vfsgid); in ovl_idmap_posix_acl()
|
/linux-6.3-rc2/security/integrity/ima/ |
A D | ima_policy.c | 83 static inline bool vfsgid_gt_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_gt_kgid() argument 85 return __vfsgid_val(vfsgid) > __kgid_val(kgid); in vfsgid_gt_kgid() 93 static inline bool vfsgid_lt_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_lt_kgid() argument 95 return __vfsgid_val(vfsgid) < __kgid_val(kgid); in vfsgid_lt_kgid() 113 …bool (*fgroup_op)(vfsgid_t vfsgid, kgid_t rule_gid); /* vfsgid_eq_kgid(), vfsgid_gt_kgid(), vfsgid…
|
/linux-6.3-rc2/fs/f2fs/ |
A D | file.c | 917 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in __setattr_copy() local 919 if (!vfsgid_in_group_p(vfsgid) && in __setattr_copy()
|