Lines Matching refs:u1
1338 * Determine if u1 "can see" the subject specified by u2, according to the
1342 * References: *u1 and *u2 must not change during the call
1343 * u1 may equal u2, in which case only one reference is required
1346 cr_seeotheruids(struct ucred *u1, struct ucred *u2)
1349 if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) {
1350 if (priv_check_cred(u1, PRIV_SEEOTHERUIDS, 0) != 0)
1368 * Determine if u1 can "see" the subject specified by u2, according to the
1372 * References: *u1 and *u2 must not change during the call
1373 * u1 may equal u2, in which case only one reference is required
1376 cr_seeothergids(struct ucred *u1, struct ucred *u2)
1382 for (i = 0; i < u1->cr_ngroups; i++) {
1383 if (groupmember(u1->cr_groups[i], u2))
1389 if (priv_check_cred(u1, PRIV_SEEOTHERGIDS, 0) != 0)
1397 * Determine if u1 "can see" the subject specified by u2.
1400 * References: *u1 and *u2 must not change during the call
1401 * u1 may equal u2, in which case only one reference is required
1404 cr_cansee(struct ucred *u1, struct ucred *u2)
1408 if ((error = prison_check(u1, u2)))
1411 if ((error = mac_cred_check_visible(u1, u2)))
1414 if ((error = cr_seeotheruids(u1, u2)))
1416 if ((error = cr_seeothergids(u1, u2)))