/linux/include/linux/ |
H 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); 131 struct user_namespace *fs_userns, vfsgid_t vfsgid); 185 vfsgid_t vfsgid) in vfsgid_has_fsmapping() argument 187 return gid_valid(from_vfsgid(idmap, fs_userns, vfsgid)); in vfsgid_has_fsmapping() 191 vfsgid_t vfsgid) in vfsgid_has_mapping() argument 193 return from_kgid(userns, AS_KGIDT(vfsgid)) != (gid_t)-1; in vfsgid_has_mapping() 204 static inline kgid_t vfsgid_into_kgid(vfsgid_t vfsgid) in vfsgid_into_kgid() argument 206 return AS_KGIDT(vfsgid); in vfsgid_into_kgid()
|
/linux/fs/ |
H A D | mnt_idmapping.c | 164 struct user_namespace *fs_userns, vfsgid_t vfsgid) in from_vfsgid() argument 169 return AS_KGIDT(vfsgid); in from_vfsgid() 170 gid = map_id_up(&idmap->gid_map, __vfsgid_val(vfsgid)); in from_vfsgid() 189 int vfsgid_in_group_p(vfsgid_t vfsgid) in vfsgid_in_group_p() argument 191 return in_group_p(AS_KGIDT(vfsgid)); in vfsgid_in_group_p() 194 int vfsgid_in_group_p(vfsgid_t vfsgid) in vfsgid_in_group_p() argument
|
H A D | attr.c | 126 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in chgrp_ok() local 129 if (vfsgid_eq(ia_vfsgid, vfsgid)) in chgrp_ok() 136 if (!vfsgid_valid(vfsgid) && in chgrp_ok() 195 vfsgid_t vfsgid; in setattr_prepare() local 201 vfsgid = attr->ia_vfsgid; in setattr_prepare() 203 vfsgid = i_gid_into_vfsgid(idmap, inode); in setattr_prepare() 206 if (!in_group_or_capable(idmap, inode, vfsgid)) in setattr_prepare()
|
H A D | posix_acl.c | 382 vfsgid_t vfsgid; in posix_acl_permission() local 401 vfsgid = i_gid_into_vfsgid(idmap, inode); in posix_acl_permission() 402 if (vfsgid_in_group_p(vfsgid)) { in posix_acl_permission() 409 vfsgid = make_vfsgid(idmap, fs_userns, in posix_acl_permission() 411 if (vfsgid_in_group_p(vfsgid)) { in posix_acl_permission() 898 vfsgid_t vfsgid; in vfs_posix_acl_to_xattr() local 922 vfsgid = make_vfsgid(idmap, fs_userns, acl_e->e_gid); in vfs_posix_acl_to_xattr() 924 caller_userns, vfsgid_into_kgid(vfsgid))); in vfs_posix_acl_to_xattr()
|
H A D | internal.h | 203 const struct inode *inode, vfsgid_t vfsgid);
|
H A D | exec.c | 1670 vfsgid_t vfsgid; in bprm_fill_uid() 1690 vfsgid = i_gid_into_vfsgid(idmap, inode); in bprm_fill_uid() 1695 !vfsgid_has_mapping(bprm->cred->user_ns, vfsgid)) in bprm_fill_uid() 1705 bprm->cred->egid = vfsgid_into_kgid(vfsgid); in bprm_creds_from_file() 1659 vfsgid_t vfsgid; bprm_fill_uid() local
|
H A D | stat.c | 50 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in generic_fillattr() local 57 stat->gid = vfsgid_into_kgid(vfsgid); in generic_fillattr()
|
H A D | inode.c | 2533 const struct inode *inode, vfsgid_t vfsgid) in in_group_or_capable() argument 2535 if (vfsgid_in_group_p(vfsgid)) in in_group_or_capable()
|
H A D | namei.c | 368 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in acl_permission_check() local 369 if (vfsgid_in_group_p(vfsgid)) in acl_permission_check()
|
/linux/fs/smb/server/ |
H 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()
|
H 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()
|
H A D | oplock.c | 1721 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in create_posix_rsp_buf() 1765 id_to_sid(from_kgid_munged(&init_user_ns, vfsgid_into_kgid(vfsgid)), 1716 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); create_posix_rsp_buf() local
|
H A D | smb2pdu.c | 2622 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in ksmbd_acls_fattr() 2625 fattr->cf_gid = vfsgid_into_kgid(vfsgid); in ksmbd_acls_fattr() 5122 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in find_file_posix_info() 5156 id_to_sid(from_kgid_munged(&init_user_ns, vfsgid_into_kgid(vfsgid)), in find_file_posix_info() 2615 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); ksmbd_acls_fattr() local 5124 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); find_file_posix_info() local
|
/linux/fs/xfs/ |
H A D | xfs_itable.c | 70 vfsgid_t vfsgid; in xfs_bulkstat_one_int() local 98 vfsgid = i_gid_into_vfsgid(idmap, inode); in xfs_bulkstat_one_int() 114 buf->bs_gid = from_kgid(sb_userns, vfsgid_into_kgid(vfsgid)); in xfs_bulkstat_one_int()
|
H A D | xfs_iops.c | 578 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in xfs_vn_getattr() 590 stat->gid = vfsgid_into_kgid(vfsgid); in xfs_vn_getattr() 561 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); xfs_vn_getattr() local
|
/linux/fs/overlayfs/ |
H A D | inode.c | 355 vfsgid_t vfsgid; in ovl_idmap_posix_acl() 364 vfsgid = make_vfsgid(idmap, fs_userns, e->e_gid); in ovl_idmap_posix_acl() 365 e->e_gid = vfsgid_into_kgid(vfsgid); in ovl_idmap_posix_acl() 356 vfsgid_t vfsgid; ovl_idmap_posix_acl() local
|
H A D | util.c | 1518 vfsgid_t vfsgid; in ovl_copyattr() local 1525 vfsgid = i_gid_into_vfsgid(real_idmap, realinode); in ovl_copyattr() 1528 inode->i_gid = vfsgid_into_kgid(vfsgid); in ovl_copyattr()
|
/linux/security/integrity/ima/ |
H 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_lt_kgid() */
|
/linux/fs/f2fs/ |
H A D | file.c | 926 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in __setattr_copy() local 928 if (!vfsgid_in_group_p(vfsgid) && in __setattr_copy()
|