Lines Matching defs:u2

114 static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2);
115 static int cr_canseeothergids(struct ucred *u1, struct ucred *u2);
116 static int cr_canseejailproc(struct ucred *u1, struct ucred *u2);
1806 * Determine if u1 "can see" the subject specified by u2, according to the
1810 * References: *u1 and *u2 must not change during the call
1811 * u1 may equal u2, in which case only one reference is required
1814 cr_canseeotheruids(struct ucred *u1, struct ucred *u2)
1817 if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) {
1836 * Determine if u1 can "see" the subject specified by u2, according to the
1840 * References: *u1 and *u2 must not change during the call
1841 * u1 may equal u2, in which case only one reference is required
1844 cr_canseeothergids(struct ucred *u1, struct ucred *u2)
1847 if (realgroupmember(u1->cr_rgid, u2))
1851 if (realgroupmember(u1->cr_groups[i], u2))
1875 * Determine if u1 "can see" the subject specified by u2, according to the
1879 * References: *u1 and *u2 must not change during the call
1880 * u1 may equal u2, in which case only one reference is required
1883 cr_canseejailproc(struct ucred *u1, struct ucred *u2)
1886 u1->cr_prison == u2->cr_prison || /* Same jail. */
1895 * policies. Determines if u1 "can see" u2 according to these policies.
1899 cr_bsd_visible(struct ucred *u1, struct ucred *u2)
1903 error = cr_canseeotheruids(u1, u2);
1906 error = cr_canseeothergids(u1, u2);
1909 error = cr_canseejailproc(u1, u2);
1916 * Determine if u1 "can see" the subject specified by u2.
1919 * References: *u1 and *u2 must not change during the call
1920 * u1 may equal u2, in which case only one reference is required
1923 cr_cansee(struct ucred *u1, struct ucred *u2)
1927 if ((error = prison_check(u1, u2)))
1930 if ((error = mac_cred_check_visible(u1, u2)))
1933 if ((error = cr_bsd_visible(u1, u2)))