Lines Matching refs:cred

71 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,  in cap_capable()  argument
82 if (ns == cred->user_ns) in cap_capable()
83 return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM; in cap_capable()
93 if ((ns->parent == cred->user_ns) && uid_eq(ns->owner, cred->euid)) in cap_capable()
139 const struct cred *cred, *child_cred; in cap_ptrace_access_check() local
143 cred = current_cred(); in cap_ptrace_access_check()
146 caller_caps = &cred->cap_effective; in cap_ptrace_access_check()
148 caller_caps = &cred->cap_permitted; in cap_ptrace_access_check()
149 if (cred->user_ns == child_cred->user_ns && in cap_ptrace_access_check()
176 const struct cred *cred, *child_cred; in cap_ptrace_traceme() local
179 cred = __task_cred(parent); in cap_ptrace_traceme()
181 if (cred->user_ns == child_cred->user_ns && in cap_ptrace_traceme()
182 cap_issubset(child_cred->cap_permitted, cred->cap_permitted)) in cap_ptrace_traceme()
205 const struct cred *cred; in cap_capget() local
209 cred = __task_cred(target); in cap_capget()
210 *effective = cred->cap_effective; in cap_capget()
211 *inheritable = cred->cap_inheritable; in cap_capget()
212 *permitted = cred->cap_permitted; in cap_capget()
245 int cap_capset(struct cred *new, in cap_capset()
246 const struct cred *old, in cap_capset()
293 cap_clear(bprm->cred->cap_permitted); in bprm_clear_caps()
349 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
491 const struct cred *old = current_cred(); in cap_bprm_set_creds()
492 struct cred *new = bprm->cred; in cap_bprm_set_creds()
628 const struct cred *cred = current_cred(); in cap_bprm_secureexec() local
629 kuid_t root_uid = make_kuid(cred->user_ns, 0); in cap_bprm_secureexec()
631 if (!uid_eq(cred->uid, root_uid)) { in cap_bprm_secureexec()
634 if (!cap_issubset(cred->cap_permitted, cred->cap_ambient)) in cap_bprm_secureexec()
638 return (!uid_eq(cred->euid, cred->uid) || in cap_bprm_secureexec()
639 !gid_eq(cred->egid, cred->gid)); in cap_bprm_secureexec()
727 static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old) in cap_emulate_setxuid()
764 int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags) in cap_task_fix_setuid()
871 struct cred *new; in cap_prctl_drop()
900 const struct cred *old = current_cred(); in cap_task_prctl()
901 struct cred *new; in cap_task_prctl()