Lines Matching refs:uthread

353 	struct uthread *uthread = get_bsdthread_info(current_thread());
360 if (!(uthread->uu_flag & UT_SETUID))
363 if ((error = suword(uap->uidp, kauth_cred_getruid(uthread->uu_ucred))))
365 if ((error = suword(uap->gidp, kauth_cred_getrgid(uthread->uu_ucred))))
1400 struct uthread *uthread = get_bsdthread_info(current_thread());
1415 if ((uthread->uu_flag & UT_SETUID) == 0)
1420 kauth_cred_unref(&uthread->uu_ucred);
1421 uthread->uu_ucred = uc;
1422 uthread->uu_flag &= ~UT_SETUID;
1427 if ((uthread->uu_flag & UT_SETUID) != 0) {
1438 kauth_cred_ref(uthread->uu_ucred);
1439 my_cred = uthread->uu_ucred;
1442 uthread->uu_ucred = my_new_cred;
1443 uthread->uu_flag |= UT_SETUID;
1445 /* Drop old uthread reference or our extra reference */
1472 struct uthread *uthread = get_bsdthread_info(current_thread());
1496 if ((uthread->uu_flag & UT_SETUID) != 0)
1519 kauth_cred_ref(uthread->uu_ucred);
1520 my_cred = uthread->uu_ucred;
1525 uthread->uu_ucred = my_new_cred;
1527 uthread->uu_flag |= UT_SETUID;
1529 /* Drop old uthread reference or our extra reference */
1542 if ((uthread->uu_flag & UT_SETUID) == 0)
1547 kauth_cred_unref(&uthread->uu_ucred);
1548 uthread->uu_ucred = my_new_cred;
1549 uthread->uu_flag &= ~UT_SETUID;
1597 struct uthread *uthread = get_bsdthread_info(current_thread());
1621 if ((uthread->uu_flag & UT_SETUID) != 0) {
1623 int my_cred_flags = uthread->uu_ucred->cr_flags;
1636 my_cred = uthread->uu_ucred;
1637 uthread->uu_ucred = kauth_cred_setgroups(my_cred, &newgroups[0], ngrp, gmuid);
1639 if (my_cred != uthread->uu_ucred) {
1640 DEBUG_CRED_CHANGE("setgroups1(CH)%d: %p/0x%08x->%p/0x%08x\n", p->p_pid, my_cred, my_cred_flags, uthread->uu_ucred , uthread->uu_ucred ->cr_flags);
2005 uthread_t uthread;
2006 uthread = (uthread_t)get_bsdthread_info(current_thread());
2007 if (uthread->uu_flag & UT_VFORK)