Lines Matching refs:cred
174 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() local
176 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm()
177 uid_eq(pcred->euid, cred->euid)) in set_one_prio_perm()
216 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
252 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3()
253 user = cred->user; in SYSCALL_DEFINE3()
255 uid = cred->uid; in SYSCALL_DEFINE3()
256 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3()
265 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3()
286 const struct cred *cred = current_cred(); in SYSCALL_DEFINE2() local
320 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE2()
321 user = cred->user; in SYSCALL_DEFINE2()
323 uid = cred->uid; in SYSCALL_DEFINE2()
324 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE2()
336 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE2()
369 const struct cred *old; in __sys_setregid()
370 struct cred *new; in __sys_setregid()
435 const struct cred *old; in __sys_setgid()
436 struct cred *new; in __sys_setgid()
476 static int set_user(struct cred *new) in set_user()
489 static void flag_nproc_exceeded(struct cred *new) in flag_nproc_exceeded()
526 const struct cred *old; in __sys_setreuid()
527 struct cred *new; in __sys_setreuid()
607 const struct cred *old; in __sys_setuid()
608 struct cred *new; in __sys_setuid()
664 const struct cred *old; in __sys_setresuid()
665 struct cred *new; in __sys_setresuid()
743 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
747 ruid = from_kuid_munged(cred->user_ns, cred->uid); in SYSCALL_DEFINE3()
748 euid = from_kuid_munged(cred->user_ns, cred->euid); in SYSCALL_DEFINE3()
749 suid = from_kuid_munged(cred->user_ns, cred->suid); in SYSCALL_DEFINE3()
766 const struct cred *old; in __sys_setresgid()
767 struct cred *new; in __sys_setresgid()
832 const struct cred *cred = current_cred(); in SYSCALL_DEFINE3() local
836 rgid = from_kgid_munged(cred->user_ns, cred->gid); in SYSCALL_DEFINE3()
837 egid = from_kgid_munged(cred->user_ns, cred->egid); in SYSCALL_DEFINE3()
838 sgid = from_kgid_munged(cred->user_ns, cred->sgid); in SYSCALL_DEFINE3()
859 const struct cred *old; in __sys_setfsuid()
860 struct cred *new; in __sys_setfsuid()
903 const struct cred *old; in __sys_setfsgid()
904 struct cred *new; in __sys_setfsgid()
1652 const struct cred *cred = current_cred(), *tcred; in check_prlimit_permission() local
1659 id_match = (uid_eq(cred->uid, tcred->euid) && in check_prlimit_permission()
1660 uid_eq(cred->uid, tcred->suid) && in check_prlimit_permission()
1661 uid_eq(cred->uid, tcred->uid) && in check_prlimit_permission()
1662 gid_eq(cred->gid, tcred->egid) && in check_prlimit_permission()
1663 gid_eq(cred->gid, tcred->sgid) && in check_prlimit_permission()
1664 gid_eq(cred->gid, tcred->gid)); in check_prlimit_permission()
1668 return security_task_prlimit(cred, tcred, flags); in check_prlimit_permission()