/linux/kernel/ |
A D | cred.c | 85 struct cred *cred = (struct cred *) _cred; in alter_cred_subscribers() local 96 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local 106 cred, cred->magic, cred->put_addr, in put_cred_rcu() 112 cred, atomic_read(&cred->usage)); in put_cred_rcu() 135 void __put_cred(struct cred *cred) in __put_cred() argument 147 BUG_ON(cred == current->cred); in __put_cred() 162 struct cred *cred; in exit_creds() local 168 cred = (struct cred *) tsk->real_cred; in exit_creds() 174 cred = (struct cred *) tsk->cred; in exit_creds() 198 const struct cred *cred; in get_task_cred() local [all …]
|
A 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 …]
|
A D | groups.c | 118 void set_groups(struct cred *new, struct group_info *group_info) in set_groups() 136 struct cred *new; in set_current_groups() 150 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local 157 i = cred->group_info->ngroups; in SYSCALL_DEFINE2() 163 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2() 216 const struct cred *cred = current_cred(); in in_group_p() local 219 if (!gid_eq(grp, cred->fsgid)) in in_group_p() 220 retval = groups_search(cred->group_info, grp); in in_group_p() 228 const struct cred *cred = current_cred(); in in_egroup_p() local 231 if (!gid_eq(grp, cred->egid)) in in_egroup_p() [all …]
|
/linux/include/linux/ |
A D | cred.h | 19 struct cred; 110 struct cred { struct 183 extern bool creds_are_invalid(const struct cred *cred); 229 static inline struct cred *get_new_cred(struct cred *cred) in get_new_cred() argument 248 static inline const struct cred *get_cred(const struct cred *cred) in get_cred() argument 250 struct cred *nonconst_cred = (struct cred *) cred; in get_cred() 251 if (!cred) in get_cred() 258 static inline const struct cred *get_cred_rcu(const struct cred *cred) in get_cred_rcu() argument 260 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_rcu() 261 if (!cred) in get_cred_rcu() [all …]
|
A D | security.h | 36 struct cred; 278 int security_capable(const struct cred *cred, 399 void security_cred_free(struct cred *cred); 426 int security_task_prlimit(const struct cred *cred, const struct cred *tcred, 434 int sig, const struct cred *cred); 1031 static inline void security_cred_free(struct cred *cred) in security_cred_free() argument 1178 const struct cred *cred) in security_task_kill() argument 1362 const struct cred *cred, 1366 const struct cred *cred, in security_post_notification() argument 1862 const struct cred *cred, in security_key_alloc() argument [all …]
|
A D | lsm_hook_defs.h | 31 const struct cred *to) 33 const struct cred *to) 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, 89 struct qstr *name, const struct cred *old, struct cred *new) 185 LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp) 186 LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred) 216 LSM_HOOK(int, 0, task_prlimit, const struct cred *cred, 224 int sig, const struct cred *cred) 274 const struct cred *cred, struct watch_notification *n) [all …]
|
A D | nsproxy.h | 57 const struct cred *cred; member 60 static inline struct cred *nsset_cred(struct nsset *set) in nsset_cred() 63 return (struct cred *)set->cred; in nsset_cred() 99 struct cred *, struct fs_struct *);
|
/linux/net/sunrpc/ |
A D | auth.c | 319 return cred->cr_ops->crstringify_acceptor(cred); in rpcauth_stringify_acceptor() 568 int res = cred->cr_ops->cr_init(auth, cred); in rpcauth_lookup_credcache() 585 const struct cred *cred = current_cred(); in rpcauth_lookupcred() local 588 acred.cred = cred; in rpcauth_lookupcred() 605 cred->cr_cred = get_cred(acred->cred); in rpcauth_init_cred() 629 .cred = init_task.cred, in rpcauth_bind_machine_cred() 653 .cred = cred, in rpcauth_bindcred() 661 else if (cred != NULL && cred != &machine_cred) in rpcauth_bindcred() 709 cred->cr_ops->crdestroy(cred); in put_rpccred() 816 if (!cred || !cred->cr_ops->crneed_reencode) in rpcauth_xmit_need_reencode() [all …]
|
A 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() 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() 106 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in unx_marshal() local [all …]
|
/linux/security/keys/ |
A D | process_keys.c | 77 const struct cred *cred = current_cred(); in look_up_user_keyrings() local 185 struct key *get_user_session_keyring_rcu(const struct cred *cred) in get_user_session_keyring_rcu() argument 194 .cred = cred, in get_user_session_keyring_rcu() 246 struct cred *new; in install_thread_keyring() 293 struct cred *new; in install_process_keyring() 330 keyring = keyring_alloc("_ses", cred->uid, cred->gid, cred, in install_session_keyring_to_cred() 426 const struct cred *cred = ctx->cred; in search_cred_keyrings_rcu() local 557 const struct cred *cred = ctx->cred; in search_process_keyrings_rcu() local 563 ctx->cred = rka->cred; in search_process_keyrings_rcu() 565 ctx->cred = cred; in search_process_keyrings_rcu() [all …]
|
A 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() 193 up_read(&cred->request_key_auth->sem); 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() 206 rka->cred = get_cred(cred); in request_key_auth_new() 217 cred->fsuid, cred->fsgid, cred, in request_key_auth_new() [all …]
|
A D | request_key.c | 77 static int umh_keys_init(struct subprocess_info *info, struct cred *cred) in umh_keys_init() argument 119 const struct cred *cred = current_cred(); in call_sbin_request_key() local 136 cred = get_current_cred(); in call_sbin_request_key() 137 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, in call_sbin_request_key() 140 put_cred(cred); in call_sbin_request_key() 160 cred->thread_keyring ? cred->thread_keyring->serial : 0); in call_sbin_request_key() 163 if (cred->process_keyring) in call_sbin_request_key() 265 const struct cred *cred = current_cred(); in construct_get_dest_keyring() local 393 ctx->cred->fsuid, ctx->cred->fsgid, ctx->cred, in construct_alloc_key() 572 .cred = current_cred(), in request_key_and_link() [all …]
|
/linux/security/ |
A D | commoncap.c | 136 const struct cred *cred, *child_cred; in cap_ptrace_access_check() local 173 const struct cred *cred, *child_cred; in cap_ptrace_traceme() local 202 const struct cred *cred; in cap_capget() local 594 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() 770 static inline bool __is_real(kuid_t uid, struct cred *cred) in __is_real() argument 773 static inline bool __is_eff(kuid_t uid, struct cred *cred) in __is_eff() argument 776 static inline bool __is_suid(kuid_t uid, struct cred *cred) in __is_suid() argument 777 { return !__is_real(uid, cred) && __is_eff(uid, cred); } in __is_suid() 795 struct cred *new = bprm->cred; in handle_privileged_root() 828 !cap_issubset(cred->cap_##target, cred->cap_##source) [all …]
|
/linux/include/linux/sunrpc/ |
A D | svcauth.h | 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() 47 if (cred->cr_group_info) in free_svc_cred() 49 kfree(cred->cr_raw_principal); in free_svc_cred() 50 kfree(cred->cr_principal); in free_svc_cred() 51 kfree(cred->cr_targ_princ); in free_svc_cred() 52 gss_mech_put(cred->cr_gss_mech); in free_svc_cred() [all …]
|
/linux/security/apparmor/include/ |
A 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()
|
/linux/fs/nfs/ |
A D | nfs4state.c | 157 const struct cred *cred) in nfs40_discover_server_trunking() argument 395 const struct cred *cred; in nfs4_get_clid_cred() local 491 const struct cred *cred, in nfs4_alloc_state_owner() argument 1835 const struct cred *cred; in nfs4_state_end_reclaim_reboot() local 1941 const struct cred *cred; in nfs4_check_lease() local 2020 const struct cred *cred; in nfs4_establish_lease() local 2151 const struct cred *cred; in nfs4_handle_migration() local 2197 const struct cred *cred; in nfs4_handle_lease_moved() local 2253 const struct cred *cred; in nfs4_discover_server_trunking() local 2459 const struct cred *cred; in nfs4_reset_session() local [all …]
|
A D | nfs4_fs.h | 68 nfs4_stateid *, const struct cred *); 114 const struct cred *so_cred; /* Associated cred */ 224 const struct cred *); 253 const struct cred *cred; member 264 struct page *, const struct cred *); 296 extern int nfs4_proc_bind_conn_to_session(struct nfs_client *, const struct cred *cred); 297 extern int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred); 306 struct page *page, const struct cred *); 472 struct nfs_client **, const struct cred *); 475 struct nfs_client **, const struct cred *); [all …]
|
A 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);
|
A D | delegation.c | 247 delegation->cred = get_cred(cred); in nfs_inode_reclaim_delegation() 265 const struct cred *cred; in nfs_do_return_delegation() local 270 cred = get_cred(delegation->cred); in nfs_do_return_delegation() 391 const struct cred *cred) in nfs_update_delegation_cred() argument 395 if (cred_fscmp(delegation->cred, cred) != 0) { in nfs_update_delegation_cred() 396 old = xchg(&delegation->cred, get_cred(cred)); in nfs_update_delegation_cred() 450 delegation->cred = get_cred(cred); in nfs_inode_set_delegation() 1279 const struct cred *cred) in nfs_delegation_test_free_expired() argument 1297 const struct cred *cred; in nfs_server_reap_expired_delegations() local 1314 cred = get_cred_rcu(delegation->cred); in nfs_server_reap_expired_delegations() [all …]
|
/linux/net/sunrpc/auth_gss/ |
A D | auth_gss.c | 389 const struct cred *cred) in gss_encode_v0_msg() argument 416 const struct cred *cred) in gss_encode_v1_msg() argument 550 kuid_t uid = cred->cr_cred->fsuid; in gss_setup_upcall() 1317 put_cred(cred->cr_cred); in gss_destroy_nullcred() 1328 gss_send_destroy_context(cred); in gss_destroy_cred() 1329 gss_destroy_nullcred(cred); in gss_destroy_cred() 1351 struct gss_cred *cred = NULL; in gss_create_cred() local 1354 if (!(cred = kzalloc(sizeof(*cred), gfp))) in gss_create_cred() 1366 return &cred->gc_base; in gss_create_cred() 1582 .cred = oldcred->cr_cred, in gss_renew_cred() [all …]
|
/linux/drivers/net/ethernet/pensando/ionic/ |
A 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()
|
/linux/fs/cifs/ |
A D | cifs_spnego.c | 21 static const struct cred *spnego_cred; 96 const struct cred *saved_cred; in cifs_get_spnego_key() 180 struct cred *cred; in init_cifs_spnego() local 192 cred = prepare_kernel_cred(NULL); in init_cifs_spnego() 193 if (!cred) in init_cifs_spnego() 197 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in init_cifs_spnego() 215 cred->thread_keyring = keyring; in init_cifs_spnego() 216 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in init_cifs_spnego() 217 spnego_cred = cred; in init_cifs_spnego() 225 put_cred(cred); in init_cifs_spnego()
|
/linux/security/smack/ |
A D | smack.h | 298 bool smack_privileged_cred(int cap, const struct cred *cred); 334 static inline struct task_smack *smack_cred(const struct cred *cred) in smack_cred() argument 336 return cred->security + smack_blob_sizes.lbs_cred; in smack_cred() 396 const struct cred *cred; in smk_of_task_struct_subj() local 400 cred = rcu_dereference(t->cred); in smk_of_task_struct_subj() 401 skp = smk_of_task(smack_cred(cred)); in smk_of_task_struct_subj() 412 const struct cred *cred; in smk_of_task_struct_obj() local 416 cred = __task_cred(t); in smk_of_task_struct_obj() 417 skp = smk_of_task(smack_cred(cred)); in smk_of_task_struct_obj()
|
/linux/security/safesetid/ |
A D | lsm.c | 90 static int safesetid_security_capable(const struct cred *cred, in safesetid_security_capable() argument 119 if (setid_policy_lookup((kid_t){.uid = cred->uid}, INVALID_ID, UID) == SIDPOL_DEFAULT) in safesetid_security_capable() 126 __kuid_val(cred->uid)); in safesetid_security_capable() 133 if (setid_policy_lookup((kid_t){.gid = cred->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT) in safesetid_security_capable() 140 __kuid_val(cred->uid)); in safesetid_security_capable() 153 static bool id_permitted_for_cred(const struct cred *old, kid_t new_id, enum setid_type new_type) in id_permitted_for_cred() 196 static int safesetid_task_fix_setuid(struct cred *new, in safesetid_task_fix_setuid() 197 const struct cred *old, in safesetid_task_fix_setuid() 220 static int safesetid_task_fix_setgid(struct cred *new, in safesetid_task_fix_setgid() 221 const struct cred *old, in safesetid_task_fix_setgid()
|
/linux/security/selinux/ |
A D | hooks.c | 214 struct cred *cred = (struct cred *) current->real_cred; in cred_init_security() local 417 const struct cred *cred) in may_context_mount_sb_relabel() argument 436 const struct cred *cred) in may_context_mount_inode_relabel() argument 635 const struct cred *cred = current_cred(); in selinux_set_mnt_opts() local 2184 const struct cred *cred = current_cred(); in selinux_quotactl() local 2219 const struct cred *cred = current_cred(); in selinux_quota_on() local 2797 const struct cred *cred = current_cred(); in selinux_sb_kern_mount() local 2807 const struct cred *cred = current_cred(); in selinux_sb_statfs() local 2821 const struct cred *cred = current_cred(); in selinux_mount() local 4299 int sig, const struct cred *cred) in selinux_task_kill() argument [all …]
|