Lines Matching defs:uthread
682 struct uthread *ut;
837 struct uthread *ut = get_bsdthread_info(thread);
3266 struct uthread *uthread;
3268 uthread = get_bsdthread_info(current_thread());
3270 if (uthread == NULL)
3279 if (uthread->uu_ucred == NOCRED) {
3282 uthread->uu_ucred = kauth_cred_proc_ref(p);
3284 return(uthread->uu_ucred);
3290 uthread_t uthread;
3293 uthread = get_bsdthread_info(current_thread());
3296 kauth_cred_uthread_update(uthread, proc);
3302 * Description: Given a uthread, a proc, and whether or not the proc is locked,
3303 * late-bind the uthread cred to the proc cred.
3305 * Parameters: uthread_t The uthread to update
3313 * generally only called with the current uthread and process as
3317 kauth_cred_uthread_update(uthread_t uthread, proc_t proc)
3319 if (uthread->uu_ucred != proc->p_ucred &&
3320 (uthread->uu_flag & UT_SETUID) == 0) {
3321 kauth_cred_t old = uthread->uu_ucred;
3322 uthread->uu_ucred = kauth_cred_proc_ref(proc);
3357 struct uthread *uthread;
3359 uthread = get_bsdthread_info(current_thread());
3361 if (uthread == NULL)
3373 if (uthread->uu_ucred == NOCRED) {
3375 uthread->uu_ucred = kauth_cred_proc_ref(procp);
3378 kauth_cred_ref(uthread->uu_ucred);
3379 return(uthread->uu_ucred);