Lines Matching defs:uid
44 setuid(uid_t uid)
51 uid_t oldruid = uid;
56 if (!VALID_UID(uid, zone))
59 if (uid > MAXUID) {
60 if (ksid_lookupbyuid(zone, uid, &ksid) != 0)
83 if ((uid == cr->cr_ruid || uid == cr->cr_suid) &&
84 secpolicy_allow_setid(cr, uid, B_TRUE) != 0) {
92 newcr->cr_uid = uid;
95 } else if ((error = secpolicy_allow_setid(cr, uid, B_FALSE)) == 0) {
100 if (!uidchge && uid != cr->cr_ruid) {
113 upcount_inc(uid, zoneid);
125 if (cr->cr_uid != uid ||
126 cr->cr_ruid != uid ||
127 cr->cr_suid != uid)
132 newcr->cr_ruid = uid;
133 newcr->cr_suid = uid;
134 newcr->cr_uid = uid;
136 /* Remove the PRIV_PFEXEC, we changed the real uid. */
144 ASSERT(uid != oldruid ? uidchge : 1);
156 * did not change or an error occurred (oldruid == uid).
189 seteuid(uid_t uid)
198 if (!VALID_UID(uid, zone))
201 if (uid > MAXUID) {
202 if (ksid_lookupbyuid(zone, uid, &ksid) != 0)
220 if (uid == cr->cr_ruid || uid == cr->cr_uid || uid == cr->cr_suid ||
221 (error = secpolicy_allow_setid(cr, uid, B_FALSE)) == 0) {
224 * set-uid process must be marked to produce no core dump,
225 * if the effective uid did changed.
231 if (cr->cr_uid != uid && error == 0)
236 newcr->cr_uid = uid;
352 /* Remove the PRIV_PFEXEC, we changed the real uid. */
361 * "If the real uid is being changed, or the effective uid is
362 * being changed to a value not equal to the real uid, the
363 * saved uid is set to the new effective uid."
385 * did not change or an error occurred (oldruid == uid).