Lines Matching refs:uthread
476 struct uthread *ut;
581 struct uthread *ut = get_bsdthread_info(thread);
2459 struct uthread *uthread;
2461 uthread = get_bsdthread_info(current_thread());
2463 if (uthread == NULL)
2472 if (uthread->uu_ucred == NOCRED) {
2475 uthread->uu_ucred = kauth_cred_proc_ref(p);
2477 return(uthread->uu_ucred);
2484 * Description: Given a uthread, a proc, and whether or not the proc is locked,
2485 * late-bind the uthread cred to the proc cred.
2487 * Parameters: uthread_t The uthread to update
2495 * generally only called with the current uthread and process as
2499 kauth_cred_uthread_update(uthread_t uthread, proc_t proc)
2501 if (uthread->uu_ucred != proc->p_ucred &&
2502 (uthread->uu_flag & UT_SETUID) == 0) {
2503 kauth_cred_t old = uthread->uu_ucred;
2504 uthread->uu_ucred = kauth_cred_proc_ref(proc);
2539 struct uthread *uthread;
2541 uthread = get_bsdthread_info(current_thread());
2543 if (uthread == NULL)
2555 if (uthread->uu_ucred == NOCRED) {
2557 uthread->uu_ucred = kauth_cred_proc_ref(procp);
2560 kauth_cred_ref(uthread->uu_ucred);
2561 return(uthread->uu_ucred);