Home
last modified time | relevance | path

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

/linux-6.15/Documentation/translations/zh_CN/security/
H A Dcredentials.rst317 const struct cred *tcred;
320 tcred = __task_cred(t);
321 f->uid = tcred->uid;
322 f->gid = tcred->gid;
323 f->groups = get_group_info(tcred->groups);
/linux-6.15/kernel/
H A 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()
H A Dptrace.c278 const struct cred *cred = current_cred(), *tcred; in __ptrace_may_access() local
316 tcred = __task_cred(task); in __ptrace_may_access()
317 if (uid_eq(caller_uid, tcred->euid) && in __ptrace_may_access()
318 uid_eq(caller_uid, tcred->suid) && in __ptrace_may_access()
319 uid_eq(caller_uid, tcred->uid) && in __ptrace_may_access()
320 gid_eq(caller_gid, tcred->egid) && in __ptrace_may_access()
321 gid_eq(caller_gid, tcred->sgid) && in __ptrace_may_access()
322 gid_eq(caller_gid, tcred->gid)) in __ptrace_may_access()
324 if (ptrace_has_cap(tcred->user_ns, mode)) in __ptrace_may_access()
H A Dsys.c1680 const struct cred *cred = current_cred(), *tcred; in check_prlimit_permission() local
1686 tcred = __task_cred(task); in check_prlimit_permission()
1687 id_match = (uid_eq(cred->uid, tcred->euid) && in check_prlimit_permission()
1688 uid_eq(cred->uid, tcred->suid) && in check_prlimit_permission()
1689 uid_eq(cred->uid, tcred->uid) && in check_prlimit_permission()
1690 gid_eq(cred->gid, tcred->egid) && in check_prlimit_permission()
1691 gid_eq(cred->gid, tcred->sgid) && in check_prlimit_permission()
1692 gid_eq(cred->gid, tcred->gid)); in check_prlimit_permission()
1693 if (!id_match && !ns_capable(tcred->user_ns, CAP_SYS_RESOURCE)) in check_prlimit_permission()
1696 return security_task_prlimit(cred, tcred, flags); in check_prlimit_permission()
H A Dsignal.c786 const struct cred *tcred = __task_cred(t); in kill_ok_by_cred() local
788 return uid_eq(cred->euid, tcred->suid) || in kill_ok_by_cred()
789 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred()
790 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred()
791 uid_eq(cred->uid, tcred->uid) || in kill_ok_by_cred()
792 ns_capable(tcred->user_ns, CAP_KILL); in kill_ok_by_cred()
/linux-6.15/block/
H A Dblk-ioc.c247 const struct cred *cred = current_cred(), *tcred; in set_task_ioprio() local
250 tcred = __task_cred(task); in set_task_ioprio()
251 if (!uid_eq(tcred->uid, cred->euid) && in set_task_ioprio()
252 !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) { in set_task_ioprio()
/linux-6.15/kernel/cgroup/
H A Dcgroup-v1.c500 const struct cred *cred, *tcred; in __cgroup1_procs_write() local
519 tcred = get_task_cred(task); in __cgroup1_procs_write()
521 !uid_eq(cred->euid, tcred->uid) && in __cgroup1_procs_write()
522 !uid_eq(cred->euid, tcred->suid)) in __cgroup1_procs_write()
524 put_cred(tcred); in __cgroup1_procs_write()
/linux-6.15/Documentation/security/
H A 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.15/arch/x86/kernel/cpu/resctrl/
H A Drdtgroup.c723 const struct cred *tcred = get_task_cred(task); in rdtgroup_task_write_permission() local
732 !uid_eq(cred->euid, tcred->uid) && in rdtgroup_task_write_permission()
733 !uid_eq(cred->euid, tcred->suid)) { in rdtgroup_task_write_permission()
738 put_cred(tcred); in rdtgroup_task_write_permission()
/linux-6.15/include/linux/
H A Dsecurity.h522 int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
1346 const struct cred *tcred, in security_task_prlimit() argument
H A Dlsm_hook_defs.h248 const struct cred *tcred, unsigned int flags)
/linux-6.15/security/smack/
H A Dsmack_lsm.c1927 const struct cred *tcred; in smack_file_send_sigiotask() local
1944 tcred = __task_cred(tsk); in smack_file_send_sigiotask()
1945 if (rc != 0 && smack_privileged_cred(CAP_MAC_OVERRIDE, tcred)) in smack_file_send_sigiotask()
/linux-6.15/security/
H A Dsecurity.c3593 int security_task_prlimit(const struct cred *cred, const struct cred *tcred, in security_task_prlimit() argument
3596 return call_int_hook(task_prlimit, cred, tcred, flags); in security_task_prlimit()
/linux-6.15/security/selinux/
H A Dhooks.c4252 static int selinux_task_prlimit(const struct cred *cred, const struct cred *tcred, in selinux_task_prlimit() argument
4263 return avc_has_perm(cred_sid(cred), cred_sid(tcred), in selinux_task_prlimit()