Lines Matching defs:uid

310  * Returns:	uid_t				The real uid of the caller
328 * Returns: uid_t The effective uid of the caller
344 * Parameters: uap->uidp Address of uid_t to get uid
662 * Description: Is current process tainted by uid or gid changes system call
697 * Parameters: uap->uid uid to set
703 * real, effective, and saved uid to the requested value.
705 * If called from an unprivileged process, but uid is equal to the
706 * real or saved uid, then the effective uid will be set to the
707 * requested value, but the real and saved uid will not change.
715 uid_t uid;
724 uid = uap->uid;
729 DEBUG_CRED_ENTER("setuid (%d/%d): %p %d\n", p->p_pid, (p->p_pptr ? p->p_pptr->p_pid : 0), my_cred, uap->uid);
730 AUDIT_ARG(uid, uid);
732 if (uid != my_pcred->cr_ruid && /* allow setuid(getuid()) */
733 uid != my_pcred->cr_svuid && /* allow setuid(saved uid) */
747 svuid = uid;
748 ruid = uid;
753 (void)chgproccnt(uid, 1);
769 gmuid = uid;
778 my_new_cred = kauth_cred_setresuid(my_cred, ruid, uid, svuid, gmuid);
819 * Parameters: uap->euid effective uid to set
826 * uid, then the effective uid will be set to the requested
827 * value, but the real and saved uid will not change.
908 * Parameters: uap->ruid real uid to set
909 * uap->euid effective uid to set
914 * Notes: A value of -1 is a special case indicating that the uid for
918 * If called by a privileged process, the real and effective uid
921 * If called from an unprivileged process, the real uid may be
922 * set to the current value of the real uid, or to the current
923 * value of the saved uid. The effective uid may be set to the
924 * current value of any of the effective, real, or saved uid.
926 * If the newly requested real uid or effective uid does not
927 * match the saved uid, then set the saved uid to the new
928 * effective uid (potentially unrecoverably dropping saved
1003 * If the newly requested real uid or effective uid does
1004 * not match the saved uid, then set the saved uid to the
1005 * new effective uid. We are protected from escalation
1401 uid_t uid;
1404 uid = uap->uid;
1406 AUDIT_ARG(uid, uid);
1412 if (uid == KAUTH_UID_NONE) {
1440 my_new_cred = kauth_cred_setuidgid(my_cred, uid, gid);
1722 * /usr/bin/login. The second half is the drop of uid privilege
1723 * for a specific uid corresponding to the user.