Home
last modified time | relevance | path

Searched refs:cred (Results 1 – 25 of 300) sorted by relevance

12345678910>>...12

/linux-6.15/include/linux/
H A Dcred.h20 struct cred;
111 struct cred { struct
197 static inline const struct cred *get_cred_many(const struct cred *cred, int nr) in get_cred_many() argument
199 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_many()
200 if (!cred) in get_cred_many()
216 static inline const struct cred *get_cred(const struct cred *cred) in get_cred() argument
221 static inline const struct cred *get_cred_rcu(const struct cred *cred) in get_cred_rcu() argument
223 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_rcu()
224 if (!cred) in get_cred_rcu()
246 struct cred *cred = (struct cred *) _cred; in put_cred_many() local
[all …]
H A Dsecurity.h43 struct cred;
351 int security_capable(const struct cred *cred,
493 void security_cred_free(struct cred *cred);
522 int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
530 int sig, const struct cred *cred);
534 int security_create_user_ns(const struct cred *cred);
1376 const struct cred *cred) in security_task_kill() argument
1610 const struct cred *cred,
1614 const struct cred *cred, in security_post_notification() argument
2135 const struct cred *cred, in security_key_alloc() argument
[all …]
H A Dlsm_hook_defs.h31 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,
88 struct qstr *name, const struct cred *old, struct cred *new)
214 LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp)
215 LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
247 LSM_HOOK(int, 0, task_prlimit, const struct cred *cred,
255 int sig, const struct cred *cred)
260 LSM_HOOK(int, 0, userns_create, const struct cred *cred)
[all …]
/linux-6.15/net/sunrpc/
H A Dauth.c316 return cred->cr_ops->crstringify_acceptor(cred); in rpcauth_stringify_acceptor()
565 int res = cred->cr_ops->cr_init(auth, cred); in rpcauth_lookup_credcache()
582 const struct cred *cred = current_cred(); in rpcauth_lookupcred() local
585 acred.cred = cred; in rpcauth_lookupcred()
602 cred->cr_cred = get_cred(acred->cred); in rpcauth_init_cred()
628 .cred = init_task.cred, in rpcauth_bind_machine_cred()
654 .cred = cred, in rpcauth_bindcred()
662 else if (cred != NULL && cred != &machine_cred) in rpcauth_bindcred()
710 cred->cr_ops->crdestroy(cred); in put_rpccred()
822 if (!cred || !cred->cr_ops->crneed_reencode) in rpcauth_xmit_need_reencode()
[all …]
H A Dauth_unix.c71 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument
73 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred()
85 if (cred->cr_cred == acred->cred) in unx_match()
88 …if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred in unx_match()
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()
114 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in unx_marshal() local
[all …]
/linux-6.15/kernel/
H A Dcred.c70 struct cred *cred = container_of(rcu, struct cred, rcu); in put_cred_rcu() local
76 cred, atomic_long_read(&cred->usage)); in put_cred_rcu()
98 void __put_cred(struct cred *cred) in __put_cred() argument
104 BUG_ON(cred == current->cred); in __put_cred()
119 struct cred *real_cred, *cred; in exit_creds() local
127 cred = (struct cred *) tsk->cred; in exit_creds()
155 const struct cred *cred; in get_task_cred() local
161 BUG_ON(!cred); in get_task_cred()
165 return cred; in get_task_cred()
307 p->cred, atomic_long_read(&p->cred->usage)); in copy_creds()
[all …]
H A Duid16.c66 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 …]
H A Dgroups.c136 struct cred *new; in set_current_groups()
137 const struct cred *old; in set_current_groups()
163 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
170 i = cred->group_info->ngroups; in SYSCALL_DEFINE2()
176 if (groups_to_user(grouplist, cred->group_info)) { in SYSCALL_DEFINE2()
229 const struct cred *cred = current_cred(); in in_group_p() local
232 if (!gid_eq(grp, cred->fsgid)) in in_group_p()
233 retval = groups_search(cred->group_info, grp); in in_group_p()
241 const struct cred *cred = current_cred(); in in_egroup_p() local
244 if (!gid_eq(grp, cred->egid)) in in_egroup_p()
[all …]
/linux-6.15/security/keys/
H A Dprocess_keys.c77 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 …]
H A Drequest_key_auth.c112 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 …]
/linux-6.15/security/apparmor/include/
H A Dcred.h22 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()
66 static inline struct aa_label *aa_get_newest_cred_label_condref(const struct cred *cred, in aa_get_newest_cred_label_condref() argument
69 struct aa_label *l = aa_cred_raw_label(cred); in aa_get_newest_cred_label_condref()
H A Dmount.h28 int aa_remount(const struct cred *subj_cred,
32 int aa_bind_mount(const struct cred *subj_cred,
37 int aa_mount_change_type(const struct cred *subj_cred,
41 int aa_move_mount_old(const struct cred *subj_cred,
44 int aa_move_mount(const struct cred *subj_cred,
48 int aa_new_mount(const struct cred *subj_cred,
53 int aa_umount(const struct cred *subj_cred,
56 int aa_pivotroot(const struct cred *subj_cred,
/linux-6.15/include/linux/sunrpc/
H A Dsvcauth.h39 cred->cr_group_info = NULL; in init_svc_cred()
40 cred->cr_raw_principal = NULL; in init_svc_cred()
41 cred->cr_principal = NULL; in init_svc_cred()
42 cred->cr_targ_princ = NULL; in init_svc_cred()
43 cred->cr_gss_mech = NULL; in init_svc_cred()
48 if (cred->cr_group_info) in free_svc_cred()
50 kfree(cred->cr_raw_principal); in free_svc_cred()
51 kfree(cred->cr_principal); in free_svc_cred()
52 kfree(cred->cr_targ_princ); in free_svc_cred()
54 init_svc_cred(cred); in free_svc_cred()
[all …]
/linux-6.15/Documentation/translations/zh_CN/security/
H A Dcredentials.rst215 task_struct中通过一个名为‘cred’的指针指向其凭据。
264 const struct cred *current_cred()
317 const struct cred *tcred;
358 这里的‘member’是cred结构体的非指针成员。例如::
374 struct cred *prepare_creds(void);
392 int commit_creds(struct cred *new);
410 void abort_creds(struct cred *new);
419 struct cred *new;
442 - ``void put_cred(const struct cred *cred);``
447 - ``const struct cred *get_cred(const struct cred *cred);``
[all …]
/linux-6.15/security/
H A Dcommoncap.c68 static inline int cap_capable_helper(const struct cred *cred, in cap_capable_helper() argument
167 const struct cred *cred, *child_cred; in cap_ptrace_access_check() local
204 const struct cred *cred, *child_cred; in cap_ptrace_traceme() local
233 const struct cred *cred; in cap_capget() local
621 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
797 static inline bool __is_real(kuid_t uid, struct cred *cred) in __is_real() argument
800 static inline bool __is_eff(kuid_t uid, struct cred *cred) in __is_eff() argument
804 { return !__is_real(uid, cred) && __is_eff(uid, cred); } in __is_suid()
822 struct cred *new = bprm->cred; in handle_privileged_root()
855 !cap_issubset(cred->cap_##target, cred->cap_##source)
[all …]
/linux-6.15/include/linux/pds/
H A Dpds_intr.h130 u32 cred, u32 flags) in pds_core_intr_credits() argument
132 if (WARN_ON_ONCE(cred > PDS_CORE_INTR_CRED_COUNT)) { in pds_core_intr_credits()
133 cred = ioread32(&intr_ctrl->credits); in pds_core_intr_credits()
134 cred &= PDS_CORE_INTR_CRED_COUNT_SIGNED; in pds_core_intr_credits()
137 iowrite32(cred | flags, &intr_ctrl->credits); in pds_core_intr_credits()
143 u32 cred; in pds_core_intr_clean_flags() local
145 cred = ioread32(&intr_ctrl->credits); in pds_core_intr_clean_flags()
146 cred &= PDS_CORE_INTR_CRED_COUNT_SIGNED; in pds_core_intr_clean_flags()
147 cred |= flags; in pds_core_intr_clean_flags()
148 iowrite32(cred, &intr_ctrl->credits); in pds_core_intr_clean_flags()
/linux-6.15/rust/helpers/
H A Dcred.c5 const struct cred *rust_helper_get_cred(const struct cred *cred) in rust_helper_get_cred() argument
7 return get_cred(cred); in rust_helper_get_cred()
10 void rust_helper_put_cred(const struct cred *cred) in rust_helper_put_cred() argument
12 put_cred(cred); in rust_helper_put_cred()
/linux-6.15/include/trace/events/
H A Dcapability.h28 TP_PROTO(const struct cred *cred, struct user_namespace *target_ns,
31 TP_ARGS(cred, target_ns, capable_ns, cap, ret),
34 __field(const struct cred *, cred)
42 __entry->cred = cred;
50 __entry->cred, __entry->target_ns, __entry->capable_ns, __entry->cap,
/linux-6.15/security/landlock/
H A Dcred.c19 static void hook_cred_transfer(struct cred *const new, in hook_cred_transfer()
20 const struct cred *const old) in hook_cred_transfer()
31 static int hook_cred_prepare(struct cred *const new, in hook_cred_prepare()
32 const struct cred *const old, const gfp_t gfp) in hook_cred_prepare()
38 static void hook_cred_free(struct cred *const cred) in hook_cred_free() argument
40 struct landlock_ruleset *const dom = landlock_cred(cred)->domain; in hook_cred_free()
51 landlock_cred(bprm->cred)->domain_exec = 0; in hook_bprm_creds_for_exec()
H A Dcred.h63 landlock_cred(const struct cred *cred) in landlock_cred() argument
65 return cred->security + landlock_blob_sizes.lbs_cred; in landlock_cred()
110 landlock_get_applicable_subject(const struct cred *const cred, in landlock_get_applicable_subject() argument
120 if (!cred) in landlock_get_applicable_subject()
123 domain = landlock_cred(cred)->domain; in landlock_get_applicable_subject()
137 return landlock_cred(cred); in landlock_get_applicable_subject()
/linux-6.15/drivers/net/ethernet/pensando/ionic/
H A Dionic_regs.h66 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-6.15/fs/nfs/
H A Dnfs4_fs.h71 const struct cred *);
117 const struct cred *so_cred; /* Associated cred */
228 const struct cred *);
257 const struct cred *cred; member
269 int (*fsid_present)(struct inode *, const struct cred *);
301 extern int nfs4_proc_bind_conn_to_session(struct nfs_client *, const struct cred *cred);
302 extern int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred);
312 struct page *page, const struct cred *);
479 struct nfs_client **, const struct cred *);
482 struct nfs_client **, const struct cred *);
[all …]
H A Dnfs4state.c160 const struct cred *cred) in nfs40_discover_server_trunking() argument
400 const struct cred *cred; in nfs4_get_clid_cred() local
496 const struct cred *cred, in nfs4_alloc_state_owner() argument
1848 const struct cred *cred; in nfs4_state_end_reclaim_reboot() local
1967 const struct cred *cred; in nfs4_check_lease() local
2052 const struct cred *cred; in nfs4_establish_lease() local
2191 const struct cred *cred; in nfs4_handle_migration() local
2237 const struct cred *cred; in nfs4_handle_lease_moved() local
2293 const struct cred *cred; in nfs4_discover_server_trunking() local
2499 const struct cred *cred; in nfs4_reset_session() local
[all …]
/linux-6.15/net/sunrpc/auth_gss/
H A Dauth_gss.c406 const struct cred *cred) in gss_encode_v0_msg() argument
433 const struct cred *cred) in gss_encode_v1_msg() argument
567 kuid_t uid = cred->cr_cred->fsuid; in gss_setup_upcall()
1351 put_cred(cred->cr_cred); in gss_destroy_nullcred()
1362 gss_send_destroy_context(cred); in gss_destroy_cred()
1363 gss_destroy_nullcred(cred); in gss_destroy_cred()
1386 struct gss_cred *cred = NULL; in gss_create_cred() local
1389 if (!(cred = kzalloc(sizeof(*cred), gfp))) in gss_create_cred()
1401 return &cred->gc_base; in gss_create_cred()
1617 .cred = oldcred->cr_cred, in gss_renew_cred()
[all …]
/linux-6.15/security/apparmor/
H A Dtask.c50 struct cred *new; in aa_replace_current_label()
120 struct cred *new; in aa_set_current_hat()
160 struct cred *new; in aa_restore_previous_label()
226 static int profile_ptrace_perm(const struct cred *cred, in profile_ptrace_perm() argument
235 ad->subj_cred = cred; in profile_ptrace_perm()
243 static int profile_tracee_perm(const struct cred *cred, in profile_tracee_perm() argument
252 return profile_ptrace_perm(cred, tracee, tracer, request, ad); in profile_tracee_perm()
255 static int profile_tracer_perm(const struct cred *cred, in profile_tracer_perm() argument
264 return profile_ptrace_perm(cred, tracer, tracee, request, ad); in profile_tracer_perm()
273 ad->error = aa_capable(cred, &tracer->label, CAP_SYS_PTRACE, in profile_tracer_perm()
[all …]

12345678910>>...12