Home
last modified time | relevance | path

Searched refs:tcred (Results 1 – 13 of 13) sorted by relevance

/linux-6.6.21/kernel/
Dtsacct.c24 const struct cred *tcred; in bacct_add_tsk() local
61 tcred = __task_cred(tsk); in bacct_add_tsk()
62 stats->ac_uid = from_kuid_munged(user_ns, tcred->uid); in bacct_add_tsk()
63 stats->ac_gid = from_kgid_munged(user_ns, tcred->gid); in bacct_add_tsk()
Dptrace.c289 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local
327 tcred = __task_cred(task); in __ptrace_may_access()
328 if (uid_eq(caller_uid, tcred->euid) && in __ptrace_may_access()
329 uid_eq(caller_uid, tcred->suid) && in __ptrace_may_access()
330 uid_eq(caller_uid, tcred->uid) && in __ptrace_may_access()
331 gid_eq(caller_gid, tcred->egid) && in __ptrace_may_access()
332 gid_eq(caller_gid, tcred->sgid) && in __ptrace_may_access()
333 gid_eq(caller_gid, tcred->gid)) in __ptrace_may_access()
335 if (ptrace_has_cap(tcred->user_ns, mode)) in __ptrace_may_access()
Dsys.c1665 const struct cred *cred = current_cred(), *tcred; in check_prlimit_permission() local
1671 tcred = __task_cred(task); in check_prlimit_permission()
1672 id_match = (uid_eq(cred->uid, tcred->euid) && in check_prlimit_permission()
1673 uid_eq(cred->uid, tcred->suid) && in check_prlimit_permission()
1674 uid_eq(cred->uid, tcred->uid) && in check_prlimit_permission()
1675 gid_eq(cred->gid, tcred->egid) && in check_prlimit_permission()
1676 gid_eq(cred->gid, tcred->sgid) && in check_prlimit_permission()
1677 gid_eq(cred->gid, tcred->gid)); in check_prlimit_permission()
1678 if (!id_match && !ns_capable(tcred->user_ns, CAP_SYS_RESOURCE)) in check_prlimit_permission()
1681 return security_task_prlimit(cred, tcred, flags); in check_prlimit_permission()
Dsignal.c827 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred() local
829 return uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred()
830 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred()
831 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred()
832 uid_eq(cred->uid, tcred->uid) || in kill_ok_by_cred()
833 ns_capable(tcred->user_ns, CAP_KILL); in kill_ok_by_cred()
/linux-6.6.21/block/
Dblk-ioc.c254 const struct cred *cred = current_cred(), *tcred; in set_task_ioprio() local
257 tcred = __task_cred(task); in set_task_ioprio()
258 if (!uid_eq(tcred->uid, cred->euid) && in set_task_ioprio()
259 !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) { in set_task_ioprio()
/linux-6.6.21/kernel/cgroup/
Dcgroup-v1.c494 const struct cred *cred, *tcred; in __cgroup1_procs_write() local
513 tcred = get_task_cred(task); in __cgroup1_procs_write()
515 !uid_eq(cred->euid, tcred->uid) && in __cgroup1_procs_write()
516 !uid_eq(cred->euid, tcred->suid)) in __cgroup1_procs_write()
518 put_cred(tcred); in __cgroup1_procs_write()
/linux-6.6.21/Documentation/security/
Dcredentials.rst372 const struct cred *tcred;
375 tcred = __task_cred(t);
376 f->uid = tcred->uid;
377 f->gid = tcred->gid;
378 f->groups = get_group_info(tcred->groups);
/linux-6.6.21/arch/x86/kernel/cpu/resctrl/
Drdtgroup.c647 const struct cred *tcred = get_task_cred(task); in rdtgroup_task_write_permission() local
656 !uid_eq(cred->euid, tcred->uid) && in rdtgroup_task_write_permission()
657 !uid_eq(cred->euid, tcred->suid)) { in rdtgroup_task_write_permission()
662 put_cred(tcred); in rdtgroup_task_write_permission()
/linux-6.6.21/include/linux/
Dsecurity.h438 int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
1192 const struct cred *tcred, in security_task_prlimit() argument
Dlsm_hook_defs.h225 const struct cred *tcred, unsigned int flags)
/linux-6.6.21/security/smack/
Dsmack_lsm.c1910 const struct cred *tcred; in smack_file_send_sigiotask() local
1927 tcred = __task_cred(tsk); in smack_file_send_sigiotask()
1928 if (rc != 0 && smack_privileged_cred(CAP_MAC_OVERRIDE, tcred)) in smack_file_send_sigiotask()
/linux-6.6.21/security/
Dsecurity.c3331 int security_task_prlimit(const struct cred *cred, const struct cred *tcred, in security_task_prlimit() argument
3334 return call_int_hook(task_prlimit, 0, cred, tcred, flags); in security_task_prlimit()
/linux-6.6.21/security/selinux/
Dhooks.c4175 static int selinux_task_prlimit(const struct cred *cred, const struct cred *tcred, in selinux_task_prlimit() argument
4186 return avc_has_perm(cred_sid(cred), cred_sid(tcred), in selinux_task_prlimit()