MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cr_canseeotheruids

Function cr_canseeotheruids

freebsd/kern/kern_prot.c:1348–1357  ·  view source on GitHub ↗

- * 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 */

Source from the content-addressed store, hash-verified

1346 * u1 may equal u2, in which case only one reference is required
1347 */
1348int
1349cr_canseeotheruids(struct ucred *u1, struct ucred *u2)
1350{
1351
1352 if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) {
1353 if (priv_check_cred(u1, PRIV_SEEOTHERUIDS) != 0)
1354 return (ESRCH);
1355 }
1356 return (0);
1357}
1358
1359/*
1360 * 'see_other_gids' determines whether or not visibility of processes

Callers 7

cr_canseeinpcbFunction · 0.85
cr_canseeFunction · 0.85
cr_cansignalFunction · 0.85
p_canschedFunction · 0.85
p_candebugFunction · 0.85
cr_canseesocketFunction · 0.85
p_canwaitFunction · 0.85

Calls 1

priv_check_credFunction · 0.70

Tested by

no test coverage detected