/kernel/linux/linux-5.10/include/linux/ |
D | cred.h | 19 struct cred; 66 extern void set_groups(struct cred *, struct group_info *); 111 struct cred { struct 155 extern void __put_cred(struct cred *); argument 158 extern const struct cred *get_task_cred(struct task_struct *); 159 extern struct cred *cred_alloc_blank(void); 160 extern struct cred *prepare_creds(void); 161 extern struct cred *prepare_exec_creds(void); 162 extern int commit_creds(struct cred *); 163 extern void abort_creds(struct cred *); [all …]
|
D | security.h | 36 struct cred; 139 extern int cap_capable(const struct cred *cred, struct user_namespace *ns, 145 extern int cap_capset(struct cred *new, const struct cred *old, 160 extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); 259 int security_binder_set_context_mgr(const struct cred *mgr); 260 int security_binder_transaction(const struct cred *from, 261 const struct cred *to); 262 int security_binder_transfer_binder(const struct cred *from, 263 const struct cred *to); 264 int security_binder_transfer_file(const struct cred *from, [all …]
|
D | lsm_hook_defs.h | 29 LSM_HOOK(int, 0, binder_set_context_mgr, const struct cred *mgr) 30 LSM_HOOK(int, 0, binder_transaction, const struct cred *from, 31 const struct cred *to) 32 LSM_HOOK(int, 0, binder_transfer_binder, const struct cred *from, 33 const struct cred *to) 34 LSM_HOOK(int, 0, binder_transfer_file, const struct cred *from, 35 const struct cred *to, struct file *file) 41 LSM_HOOK(int, 0, capset, struct cred *new, const struct cred *old, 44 LSM_HOOK(int, 0, capable, const struct cred *cred, struct user_namespace *ns, 86 struct qstr *name, const struct cred *old, struct cred *new) [all …]
|
/kernel/linux/linux-5.10/kernel/ |
D | cred.c | 42 struct cred init_cred = { 66 static inline void set_cred_subscribers(struct cred *cred, int n) in set_cred_subscribers() argument 69 atomic_set(&cred->subscribers, n); in set_cred_subscribers() 73 static inline int read_cred_subscribers(const struct cred *cred) in read_cred_subscribers() argument 76 return atomic_read(&cred->subscribers); in read_cred_subscribers() 82 static inline void alter_cred_subscribers(const struct cred *_cred, int n) in alter_cred_subscribers() 85 struct cred *cred = (struct cred *) _cred; in alter_cred_subscribers() local 87 atomic_add(n, &cred->subscribers); in alter_cred_subscribers() 96 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local 98 kdebug("put_cred_rcu(%p)", cred); in put_cred_rcu() [all …]
|
D | uid16.c | 66 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local 70 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3() 71 euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid)); in SYSCALL_DEFINE3() 72 suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid)); in SYSCALL_DEFINE3() 89 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local 93 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in SYSCALL_DEFINE3() 94 egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid)); in SYSCALL_DEFINE3() 95 sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid)); in SYSCALL_DEFINE3() 156 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local 162 i = cred->group_info->ngroups; in SYSCALL_DEFINE2() [all …]
|
D | groups.c | 123 void set_groups(struct cred *new, struct group_info *group_info) in set_groups() 141 struct cred *new; in set_current_groups() 155 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local 162 i = cred->group_info->ngroups; in SYSCALL_DEFINE2() 168 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2() 221 const struct cred *cred = current_cred(); in in_group_p() local 224 if (!gid_eq(grp, cred->fsgid)) in in_group_p() 225 retval = groups_search(cred->group_info, grp); in in_group_p() 233 const struct cred *cred = current_cred(); in in_egroup_p() local 236 if (!gid_eq(grp, cred->egid)) in in_egroup_p() [all …]
|
/kernel/linux/linux-5.10/net/sunrpc/ |
D | auth.c | 41 static struct cred machine_cred = { 52 const struct cred *rpc_machine_cred(void) in rpc_machine_cred() 264 rpcauth_unhash_cred_locked(struct rpc_cred *cred) in rpcauth_unhash_cred_locked() argument 266 if (!test_and_clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred_locked() 268 hlist_del_rcu(&cred->cr_hash); in rpcauth_unhash_cred_locked() 273 rpcauth_unhash_cred(struct rpc_cred *cred) in rpcauth_unhash_cred() argument 278 if (!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred() 280 cache_lock = &cred->cr_auth->au_credcache->lock; in rpcauth_unhash_cred() 282 ret = rpcauth_unhash_cred_locked(cred); in rpcauth_unhash_cred() 315 rpcauth_stringify_acceptor(struct rpc_cred *cred) in rpcauth_stringify_acceptor() argument [all …]
|
D | auth_unix.c | 63 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument 65 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred() 72 unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags) in unx_match() argument 77 if (cred->cr_cred == acred->cred) in unx_match() 80 …if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred… in unx_match() 83 if (acred->cred->group_info != NULL) in unx_match() 84 groups = acred->cred->group_info->ngroups; in unx_match() 87 if (cred->cr_cred->group_info == NULL) in unx_match() 89 if (groups != cred->cr_cred->group_info->ngroups) in unx_match() 93 if (!gid_eq(cred->cr_cred->group_info->gid[i], acred->cred->group_info->gid[i])) in unx_match() [all …]
|
/kernel/linux/linux-5.10/security/keys/ |
D | process_keys.c | 77 const struct cred *cred = current_cred(); in look_up_user_keyrings() local 82 uid_t uid = from_kuid(user_ns, cred->user->uid); in look_up_user_keyrings() 106 uid_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID, in look_up_user_keyrings() 107 cred, user_keyring_perm, in look_up_user_keyrings() 128 session_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID, in look_up_user_keyrings() 129 cred, user_keyring_perm, in look_up_user_keyrings() 185 struct key *get_user_session_keyring_rcu(const struct cred *cred) in get_user_session_keyring_rcu() argument 187 struct key *reg_keyring = READ_ONCE(cred->user_ns->user_keyring_register); in get_user_session_keyring_rcu() 194 .cred = cred, in get_user_session_keyring_rcu() 205 from_kuid(cred->user_ns, in get_user_session_keyring_rcu() [all …]
|
D | request_key_auth.c | 112 if (rka->cred) in free_request_key_auth() 113 put_cred(rka->cred); in free_request_key_auth() 166 const struct cred *cred = current_cred(); in request_key_auth_new() local 185 if (cred->request_key_auth) { in request_key_auth_new() 187 down_read(&cred->request_key_auth->sem); in request_key_auth_new() 192 &cred->request_key_auth->flags)) { in request_key_auth_new() 193 up_read(&cred->request_key_auth->sem); in request_key_auth_new() 198 irka = cred->request_key_auth->payload.data[0]; in request_key_auth_new() 199 rka->cred = get_cred(irka->cred); in request_key_auth_new() 202 up_read(&cred->request_key_auth->sem); in request_key_auth_new() [all …]
|
D | request_key.c | 80 static int umh_keys_init(struct subprocess_info *info, struct cred *cred) in umh_keys_init() argument 84 return install_session_keyring_to_cred(cred, keyring); in umh_keys_init() 122 const struct cred *cred = current_cred(); in call_sbin_request_key() local 139 cred = get_current_cred(); in call_sbin_request_key() 140 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, in call_sbin_request_key() 143 put_cred(cred); in call_sbin_request_key() 155 sprintf(uid_str, "%d", from_kuid(&init_user_ns, cred->fsuid)); in call_sbin_request_key() 156 sprintf(gid_str, "%d", from_kgid(&init_user_ns, cred->fsgid)); in call_sbin_request_key() 163 cred->thread_keyring ? cred->thread_keyring->serial : 0); in call_sbin_request_key() 166 if (cred->process_keyring) in call_sbin_request_key() [all …]
|
/kernel/linux/linux-5.10/fs/hmdfs/authority/ |
D | authentication.c | 42 const struct cred *hmdfs_override_fsids(bool is_recv_thread) in hmdfs_override_fsids() 44 struct cred *cred = NULL; in hmdfs_override_fsids() local 45 const struct cred *old_cred = NULL; in hmdfs_override_fsids() 47 cred = prepare_creds(); in hmdfs_override_fsids() 48 if (!cred) in hmdfs_override_fsids() 51 cred->fsuid = is_recv_thread ? SYSTEM_UID : USER_DATA_RW_UID; in hmdfs_override_fsids() 52 cred->fsgid = is_recv_thread ? SYSTEM_GID : USER_DATA_RW_GID; in hmdfs_override_fsids() 54 old_cred = override_creds(cred); in hmdfs_override_fsids() 59 const struct cred *hmdfs_override_dir_fsids(struct inode *dir, in hmdfs_override_dir_fsids() 63 struct cred *cred = NULL; in hmdfs_override_dir_fsids() local [all …]
|
D | authentication.h | 22 const struct cred *saved_cred; 93 static inline void hmdfs_check_cred(const struct cred *cred) in hmdfs_check_cred() argument 95 if (cred->fsuid.val != OID_SYSTEM || cred->fsgid.val != OID_SYSTEM) in hmdfs_check_cred() 96 hmdfs_warning("uid is %u, gid is %u", cred->fsuid.val, in hmdfs_check_cred() 97 cred->fsgid.val); in hmdfs_check_cred() 222 static inline const struct cred *hmdfs_override_creds(const struct cred *new) in hmdfs_override_creds() 230 static inline void hmdfs_revert_creds(const struct cred *old) in hmdfs_revert_creds() 249 const struct cred *hmdfs_override_fsids(bool is_recv_thread); 250 const struct cred *hmdfs_override_dir_fsids(struct inode *dir, 252 const struct cred *hmdfs_override_file_fsids(struct inode *dir, __u16 *perm); [all …]
|
/kernel/linux/common_modules/container_escape_detection/include/ |
D | ced_detection_points.h | 26 static inline void cred_info_record(struct cred_info *info, const struct cred *cred) in cred_info_record() argument 28 info->euid = cred->euid.val; in cred_info_record() 29 info->egid = cred->egid.val; in cred_info_record() 30 info->fsuid = cred->fsuid.val; in cred_info_record() 32 memcpy(&info->cap_effective.cap[0], &cred->cap_effective.cap[0], sizeof(info->cap_effective.cap)); in cred_info_record() 51 struct cred_info cred; member 65 const struct cred *cred = get_task_cred(task); in process_info_record() local 66 if (cred == NULL) { in process_info_record() 76 cred_info_record(&info->cred, cred); in process_info_record()
|
/kernel/linux/linux-5.10/include/linux/sunrpc/ |
D | svcauth.h | 36 static inline void init_svc_cred(struct svc_cred *cred) in init_svc_cred() argument 38 cred->cr_group_info = NULL; in init_svc_cred() 39 cred->cr_raw_principal = NULL; in init_svc_cred() 40 cred->cr_principal = NULL; in init_svc_cred() 41 cred->cr_targ_princ = NULL; in init_svc_cred() 42 cred->cr_gss_mech = NULL; in init_svc_cred() 45 static inline void free_svc_cred(struct svc_cred *cred) in free_svc_cred() argument 47 if (cred->cr_group_info) in free_svc_cred() 48 put_group_info(cred->cr_group_info); in free_svc_cred() 49 kfree(cred->cr_raw_principal); in free_svc_cred() [all …]
|
/kernel/linux/linux-5.10/security/apparmor/include/ |
D | cred.h | 22 static inline struct aa_label *cred_label(const struct cred *cred) in cred_label() argument 24 struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred; in cred_label() 30 static inline void set_cred_label(const struct cred *cred, in set_cred_label() argument 33 struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred; in set_cred_label() 47 static inline struct aa_label *aa_cred_raw_label(const struct cred *cred) in aa_cred_raw_label() argument 49 struct aa_label *label = cred_label(cred); in aa_cred_raw_label() 61 static inline struct aa_label *aa_get_newest_cred_label(const struct cred *cred) in aa_get_newest_cred_label() argument 63 return aa_get_newest_label(aa_cred_raw_label(cred)); in aa_get_newest_cred_label()
|
/kernel/linux/linux-5.10/security/ |
D | commoncap.c | 65 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, in cap_capable() argument 76 if (ns == cred->user_ns) in cap_capable() 77 return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM; in cap_capable() 83 if (ns->level <= cred->user_ns->level) in cap_capable() 90 if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid)) in cap_capable() 136 const struct cred *cred, *child_cred; in cap_ptrace_access_check() local 140 cred = current_cred(); in cap_ptrace_access_check() 143 caller_caps = &cred->cap_effective; in cap_ptrace_access_check() 145 caller_caps = &cred->cap_permitted; in cap_ptrace_access_check() 146 if (cred->user_ns == child_cred->user_ns && in cap_ptrace_access_check() [all …]
|
/kernel/linux/linux-5.10/fs/sharefs/ |
D | authentication.c | 79 const struct cred *sharefs_override_file_fsids(struct inode *dir, __u16 *_perm) in sharefs_override_file_fsids() 81 struct cred *cred = NULL; in sharefs_override_file_fsids() local 82 cred = prepare_creds(); in sharefs_override_file_fsids() 83 if (!cred) in sharefs_override_file_fsids() 86 cred->fsuid = dir->i_uid; in sharefs_override_file_fsids() 87 cred->fsgid = dir->i_gid; in sharefs_override_file_fsids() 88 return override_creds(cred); in sharefs_override_file_fsids() 91 void sharefs_revert_fsids(const struct cred *old_cred) in sharefs_revert_fsids() 93 const struct cred *cur_cred; in sharefs_revert_fsids() 94 cur_cred = current->cred; in sharefs_revert_fsids()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/pensando/ionic/ |
D | ionic_regs.h | 66 int intr_idx, u32 cred, u32 flags) in ionic_intr_credits() argument 68 if (WARN_ON_ONCE(cred > IONIC_INTR_CRED_COUNT)) { in ionic_intr_credits() 69 cred = ioread32(&intr_ctrl[intr_idx].credits); in ionic_intr_credits() 70 cred &= IONIC_INTR_CRED_COUNT_SIGNED; in ionic_intr_credits() 73 iowrite32(cred | flags, &intr_ctrl[intr_idx].credits); in ionic_intr_credits() 79 u32 cred; in ionic_intr_clean() local 81 cred = ioread32(&intr_ctrl[intr_idx].credits); in ionic_intr_clean() 82 cred &= IONIC_INTR_CRED_COUNT_SIGNED; in ionic_intr_clean() 83 cred |= IONIC_INTR_CRED_RESET_COALESCE; in ionic_intr_clean() 84 iowrite32(cred, &intr_ctrl[intr_idx].credits); in ionic_intr_clean()
|
/kernel/linux/linux-5.10/fs/nfs/ |
D | nfs4state.c | 113 int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred) in nfs4_init_clientid() argument 129 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs4_init_clientid() 136 status = nfs4_proc_setclientid_confirm(clp, &clid, cred); in nfs4_init_clientid() 160 const struct cred *cred) in nfs40_discover_server_trunking() argument 174 status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid); in nfs40_discover_server_trunking() 180 status = nfs40_walk_client_list(clp, result, cred); in nfs40_discover_server_trunking() 194 const struct cred *nfs4_get_machine_cred(struct nfs_client *clp) in nfs4_get_machine_cred() 207 static const struct cred * 210 const struct cred *cred = NULL; in nfs4_get_renew_cred_server_locked() local 220 cred = get_cred(sp->so_cred); in nfs4_get_renew_cred_server_locked() [all …]
|
D | nfs4_fs.h | 69 nfs4_stateid *, const struct cred *); 115 const struct cred *so_cred; /* Associated cred */ 222 int (*establish_clid)(struct nfs_client *, const struct cred *); 223 int (*reclaim_complete)(struct nfs_client *, const struct cred *); 225 const struct cred *); 255 const struct cred *cred; member 259 int (*sched_state_renewal)(struct nfs_client *, const struct cred *, unsigned); 260 const struct cred * (*get_state_renewal_cred)(struct nfs_client *); 261 int (*renew_lease)(struct nfs_client *, const struct cred *); 266 struct page *, const struct cred *); [all …]
|
D | delegation.h | 18 const struct cred *cred; member 42 int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred, 44 void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred, 69 int nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred, const nfs4_stateid *stateid… 72 …elegation_stateid(struct inode *inode, fmode_t flags, nfs4_stateid *dst, const struct cred **cred);
|
/kernel/linux/linux-5.10/mm/ |
D | purgeable_ashmem_trigger.c | 50 const struct cred *cred = current_cred(); in purgeable_ashmem_trigger_write() local 52 if (!cred) in purgeable_ashmem_trigger_write() 55 if (!uid_eq(cred->euid, GLOBAL_MEMMGR_UID) && in purgeable_ashmem_trigger_write() 56 !uid_eq(cred->euid, GLOBAL_ROOT_UID)) { in purgeable_ashmem_trigger_write() 76 const struct cred *cred = current_cred(); in purgeable_ashmem_trigger_show() local 78 if (!cred) in purgeable_ashmem_trigger_show() 81 if (!uid_eq(cred->euid, GLOBAL_MEMMGR_UID) && in purgeable_ashmem_trigger_show() 82 !uid_eq(cred->euid, GLOBAL_ROOT_UID)) { in purgeable_ashmem_trigger_show()
|
/kernel/linux/linux-5.10/net/sunrpc/auth_gss/ |
D | auth_gss.c | 116 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) in gss_cred_set_ctx() argument 118 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx() 120 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx() 124 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx() 126 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx() 130 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument 132 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx() 389 const struct cred *cred) in gss_encode_v0_msg() argument 391 struct user_namespace *userns = cred->user_ns; in gss_encode_v0_msg() 416 const struct cred *cred) in gss_encode_v1_msg() argument [all …]
|
/kernel/linux/common_modules/pac/config/ |
D | config.txt | 8 struct.task_struct cred 12 struct.cred session_keyring 13 struct.cred process_keyring 14 struct.cred thread_keyring 15 struct.cred request_key_auth 16 struct.cred security 17 struct.cred user 18 struct.cred user_ns 19 struct.cred group_info
|