freebsd5/sys/kern/kern_prot.c
/*-
 * Determine if td "can see" the subject specified by p.
 * Returns: 0 for permitted, an errno value otherwise
 * Locks: Sufficient locks to protect p->p_ucred must be held.  td really
 *        should be curthread.
 * References: td and p must be valid for the lifetime of the call
 */
Determine if td "can see" the subject specified by p.
Returns: 0 for permitted, an errno value otherwise
Locks: Sufficient locks to protect p->p_ucred must be held.  td really
should be curthread.
References: td and p must be valid for the lifetime of the call
Determine if td " can see " the subject specified by p . Returns : 0 for permitted an errno value otherwise Locks : Sufficient locks to protect p - > p_ucred must be held . td really should be curthread . References : td and p must be valid for the lifetime of the call
int
p_cansee(struct thread *td, struct proc *p)
{
	KASSERT(td == curthread, ("%s: td not curthread", __func__));
	PROC_LOCK_ASSERT(p, MA_OWNED);
	return (cr_cansee(td->td_ucred, p->p_ucred));
}
int p_cansee ( struct thread * td , struct proc * p ) { KASSERT ( td == curthread , ( " " , __func__ ) ) ; PROC_LOCK_ASSERT ( p , MA_OWNED ) ; return ( cr_cansee ( td -> td_ucred , p -> p_ucred ) ) ; }
Determine if td "can see" the subject specified by p.
 Returns: 0 for permitted, an errno value otherwise
 Locks: Sufficient locks to protect p->p_ucred must be held.
Determine if td " can see " the subject specified by p . Returns : 0 for permitted an errno value otherwise Locks : Sufficient locks to protect p - > p_ucred must be held .
/* Wrap cr_cansee() for all functionality. */