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

Function prison_check

freebsd/kern/kern_jail.c:3036–3042  ·  view source on GitHub ↗

* Return 0 if jails permit p1 to frob p2, otherwise ESRCH. */

Source from the content-addressed store, hash-verified

3034 * Return 0 if jails permit p1 to frob p2, otherwise ESRCH.
3035 */
3036int
3037prison_check(struct ucred *cred1, struct ucred *cred2)
3038{
3039
3040 return ((cred1->cr_prison == cred2->cr_prison ||
3041 prison_ischild(cred1->cr_prison, cred2->cr_prison)) ? 0 : ESRCH);
3042}
3043
3044/*
3045 * Return 1 if p2 is a child of p1, otherwise 0.

Callers 8

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
vfs_suserFunction · 0.85

Calls 1

prison_ischildFunction · 0.85

Tested by

no test coverage detected