Lines Matching defs:u2
1333 * Determine if u1 "can see" the subject specified by u2, according to the
1337 * References: *u1 and *u2 must not change during the call
1338 * u1 may equal u2, in which case only one reference is required
1341 cr_canseeotheruids(struct ucred *u1, struct ucred *u2)
1344 if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) {
1363 * Determine if u1 can "see" the subject specified by u2, according to the
1367 * References: *u1 and *u2 must not change during the call
1368 * u1 may equal u2, in which case only one reference is required
1371 cr_canseeothergids(struct ucred *u1, struct ucred *u2)
1378 if (groupmember(u1->cr_groups[i], u2))
1405 * Determine if u1 "can see" the subject specified by u2, according to the
1409 * References: *u1 and *u2 must not change during the call
1410 * u1 may equal u2, in which case only one reference is required
1413 cr_canseejailproc(struct ucred *u1, struct ucred *u2)
1417 return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0);
1421 * Determine if u1 "can see" the subject specified by u2.
1424 * References: *u1 and *u2 must not change during the call
1425 * u1 may equal u2, in which case only one reference is required
1428 cr_cansee(struct ucred *u1, struct ucred *u2)
1432 if ((error = prison_check(u1, u2)))
1435 if ((error = mac_cred_check_visible(u1, u2)))
1438 if ((error = cr_canseeotheruids(u1, u2)))
1440 if ((error = cr_canseeothergids(u1, u2)))
1442 if ((error = cr_canseejailproc(u1, u2)))