/linux-6.12.1/kernel/ |
D | groups.c | 15 struct group_info *groups_alloc(int gidsetsize) in groups_alloc() 17 struct group_info *gi; in groups_alloc() 29 void groups_free(struct group_info *group_info) in groups_free() argument 31 kvfree(group_info); in groups_free() 38 const struct group_info *group_info) in groups_to_user() argument 42 unsigned int count = group_info->ngroups; in groups_to_user() 46 gid = from_kgid_munged(user_ns, group_info->gid[i]); in groups_to_user() 54 static int groups_from_user(struct group_info *group_info, in groups_from_user() argument 59 unsigned int count = group_info->ngroups; in groups_from_user() 71 group_info->gid[i] = kgid; in groups_from_user() [all …]
|
D | uid16.c | 115 struct group_info *group_info) in groups16_to_user() argument 122 for (i = 0; i < group_info->ngroups; i++) { in groups16_to_user() 123 kgid = group_info->gid[i]; in groups16_to_user() 132 static int groups16_from_user(struct group_info *group_info, in groups16_from_user() argument 140 for (i = 0; i < group_info->ngroups; i++) { in groups16_from_user() 148 group_info->gid[i] = kgid; in groups16_from_user() 162 i = cred->group_info->ngroups; in SYSCALL_DEFINE2() 168 if (groups16_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2() 179 struct group_info *group_info; in SYSCALL_DEFINE2() local 187 group_info = groups_alloc(gidsetsize); in SYSCALL_DEFINE2() [all …]
|
D | cred.c | 39 static struct group_info init_groups = { .usage = REFCOUNT_INIT(2) }; 61 .group_info = &init_groups, 83 if (cred->group_info) in put_cred_rcu() 84 put_group_info(cred->group_info); in put_cred_rcu() 223 get_group_info(new->group_info); in prepare_creds() 545 struct group_info *ga, *gb; in cred_fscmp() 560 ga = a->group_info; in cred_fscmp() 561 gb = b->group_info; in cred_fscmp() 650 get_group_info(new->group_info); in prepare_kernel_cred()
|
D | auditsc.c | 520 result = groups_search(cred->group_info, f->gid); in audit_filter_rules() 523 result = !groups_search(cred->group_info, f->gid); in audit_filter_rules() 530 result = groups_search(cred->group_info, f->gid); in audit_filter_rules() 533 result = !groups_search(cred->group_info, f->gid); in audit_filter_rules()
|
/linux-6.12.1/include/linux/ |
D | cred.h | 26 struct group_info { struct 41 static inline struct group_info *get_group_info(struct group_info *gi) in get_group_info() 51 #define put_group_info(group_info) \ argument 53 if (refcount_dec_and_test(&(group_info)->usage)) \ 54 groups_free(group_info); \ 58 extern struct group_info *groups_alloc(int); 59 extern void groups_free(struct group_info *); 63 extern int groups_search(const struct group_info *, kgid_t); 65 extern int set_current_groups(struct group_info *); 66 extern void set_groups(struct cred *, struct group_info *); [all …]
|
D | nfs_fs.h | 65 struct group_info *group_info; member
|
/linux-6.12.1/net/sunrpc/ |
D | auth_unix.c | 91 if (acred->cred->group_info != NULL) in unx_match() 92 groups = acred->cred->group_info->ngroups; in unx_match() 95 if (cred->cr_cred->group_info == NULL) in unx_match() 97 if (groups != cred->cr_cred->group_info->ngroups) in unx_match() 101 if (!gid_eq(cred->cr_cred->group_info->gid[i], acred->cred->group_info->gid[i])) in unx_match() 117 struct group_info *gi = cred->cr_cred->group_info; in unx_marshal()
|
D | svcauth.c | 198 if (cred->group_info) in svcauth_map_clnt_to_svc_cred_local() 199 svc->cr_group_info = get_group_info(cred->group_info); in svcauth_map_clnt_to_svc_cred_local()
|
D | svcauth_unix.c | 411 struct group_info *gi; 642 static struct group_info *unix_gid_find(kuid_t uid, struct svc_rqst *rqstp) in unix_gid_find() 645 struct group_info *gi; in unix_gid_find() 674 struct group_info *gi; in svcauth_unix_set_client()
|
/linux-6.12.1/security/safesetid/ |
D | lsm.c | 247 get_group_info(new->group_info); in safesetid_task_fix_setgroups() 248 for (i = 0; i < new->group_info->ngroups; i++) { in safesetid_task_fix_setgroups() 249 if (!id_permitted_for_cred(old, (kid_t){.gid = new->group_info->gid[i]}, GID)) { in safesetid_task_fix_setgroups() 250 put_group_info(new->group_info); in safesetid_task_fix_setgroups() 261 put_group_info(new->group_info); in safesetid_task_fix_setgroups()
|
/linux-6.12.1/fs/nfsd/ |
D | filecache.c | 87 if (c1->group_info == NULL || c2->group_info == NULL) in nfsd_match_cred() 88 return c1->group_info == c2->group_info; in nfsd_match_cred() 89 if (c1->group_info->ngroups != c2->group_info->ngroups) in nfsd_match_cred() 91 for (i = 0; i < c1->group_info->ngroups; i++) { in nfsd_match_cred() 92 if (!gid_eq(c1->group_info->gid[i], c2->group_info->gid[i])) in nfsd_match_cred()
|
D | auth.c | 23 struct group_info *rqgi; in nfsd_setuser() 24 struct group_info *gi; in nfsd_setuser()
|
/linux-6.12.1/net/netfilter/ |
D | xt_owner.c | 102 struct group_info *gi = filp->f_cred->group_info; in owner_mt()
|
/linux-6.12.1/fs/proc/ |
D | array.c | 152 struct group_info *group_info; in task_state() local 200 group_info = cred->group_info; in task_state() 201 for (g = 0; g < group_info->ngroups; g++) in task_state() 203 from_kgid_munged(user_ns, group_info->gid[g])); in task_state()
|
/linux-6.12.1/security/keys/ |
D | permission.c | 67 ret = groups_search(cred->group_info, key->gid); in key_task_permission()
|
D | process_keys.c | 939 new->group_info = get_group_info(old->group_info); in key_change_session_keyring()
|
/linux-6.12.1/net/ipv4/ |
D | ping.c | 256 struct group_info *group_info; in ping_init_sock() local 268 group_info = get_current_groups(); in ping_init_sock() 269 for (i = 0; i < group_info->ngroups; i++) { in ping_init_sock() 270 kgid_t gid = group_info->gid[i]; in ping_init_sock() 279 put_group_info(group_info); in ping_init_sock()
|
/linux-6.12.1/io_uring/ |
D | fdinfo.c | 23 struct group_info *gi; in io_uring_show_cred() 37 gi = cred->group_info; in io_uring_show_cred()
|
/linux-6.12.1/include/linux/sunrpc/ |
D | svcauth.h | 25 struct group_info *cr_group_info;
|
/linux-6.12.1/fs/nfs/ |
D | dir.c | 2843 put_group_info(entry->group_info); in nfs_access_free_entry() 2971 struct group_info *ga, *gb; in access_cmp() 2984 ga = a->group_info; in access_cmp() 2985 gb = b->group_info; in access_cmp() 3183 cache->group_info = get_group_info(cred->group_info); in nfs_access_add_cache()
|
/linux-6.12.1/fs/ext4/ |
D | mballoc.c | 3392 struct ext4_group_info ***group_info; in ext4_mb_add_groupinfo() local 3395 group_info = rcu_dereference(sbi->s_group_info); in ext4_mb_add_groupinfo() 3396 kfree(group_info[idx]); in ext4_mb_add_groupinfo() 3397 group_info[idx] = NULL; in ext4_mb_add_groupinfo() 3410 struct ext4_group_info ***group_info; in ext4_mb_init_backend() local 3480 group_info = rcu_dereference(sbi->s_group_info); in ext4_mb_init_backend() 3482 kfree(group_info[i]); in ext4_mb_init_backend() 3775 struct ext4_group_info *grinfo, ***group_info; in ext4_mb_release() local 3807 group_info = rcu_dereference(sbi->s_group_info); in ext4_mb_release() 3809 kfree(group_info[i]); in ext4_mb_release() [all …]
|
/linux-6.12.1/fs/smb/server/ |
D | smb_common.c | 745 struct group_info *gi; in __ksmbd_override_fsids()
|
/linux-6.12.1/sound/pci/asihpi/ |
D | hpifunc.c | 823 *poutstream_map = hr.u.d.u.group_info.outstream_group_map; in hpi_outstream_group_get_map() 825 *pinstream_map = hr.u.d.u.group_info.instream_group_map; in hpi_outstream_group_get_map() 1181 *poutstream_map = hr.u.d.u.group_info.outstream_group_map; in hpi_instream_group_get_map() 1183 *pinstream_map = hr.u.d.u.group_info.instream_group_map; in hpi_instream_group_get_map()
|
/linux-6.12.1/fs/ceph/ |
D | mds_client.c | 2916 ceph_encode_32(p, req->r_cred->group_info->ngroups); in encode_mclientrequest_tail() 2917 for (i = 0; i < req->r_cred->group_info->ngroups; i++) in encode_mclientrequest_tail() 2919 req->r_cred->group_info->gid[i])); in encode_mclientrequest_tail() 3058 len += sizeof(u32) + (sizeof(u64) * req->r_cred->group_info->ngroups); in create_request_message() 5632 if (!gid_matched && cred->group_info->ngroups) { in ceph_mds_auth_match() 5633 for (i = 0; i < cred->group_info->ngroups; i++) { in ceph_mds_auth_match() 5635 cred->group_info->gid[i]); in ceph_mds_auth_match()
|
/linux-6.12.1/Documentation/security/ |
D | credentials.rst | 260 2. the reference count on the group_info struct it points to may be changed; 348 struct group_info *get_current_groups(void);
|