FreeBSD/sys/kern/kern_prot.c
/*-
 * Determine if u1 "can see" the subject specified by u2, according to the
 * 'see_other_uids' policy.
 * Returns: 0 for permitted, ESRCH otherwise
 * Locks: none
 * References: *u1 and *u2 must not change during the call
 *             u1 may equal u2, in which case only one reference is required
 */
Determine if u1 "can see" the subject specified by u2, according to the
'see_other_uids' policy.
Returns: 0 for permitted, ESRCH otherwise
Locks: none
References: *u1 and *u2 must not change during the call
u1 may equal u2, in which case only one reference is required
Determine if u1 " can see " the subject specified by u2 according to the ' see_other_uids ' policy . Returns : 0 for permitted ESRCH otherwise Locks : none References : * u1 and * u2 must not change during the call u1 may equal u2 in which case only one reference is required
static int
cr_seeotheruids(struct ucred *u1, struct ucred *u2)
{
	if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) {
		if (priv_check_cred(u1, PRIV_SEEOTHERUIDS, 0) != 0)
			return (ESRCH);
	}
	return (0);
}
static int cr_seeotheruids ( struct ucred * u1 , struct ucred * u2 ) { if ( ! see_other_uids && u1 -> cr_ruid != u2 -> cr_ruid ) { if ( priv_check_cred ( u1 , PRIV_SEEOTHERUIDS , 0 ) != 0 ) return ( ESRCH ) ; } return ( 0 ) ; }
Determine if u1 "can see" the subject specified by u2, according to the
 'see_other_uids' policy.
Determine if u1 " can see " the subject specified by u2 according to the ' see_other_uids ' policy .