* Return 0 if jails permit p1 to frob p2, otherwise ESRCH. */
| 3034 | * Return 0 if jails permit p1 to frob p2, otherwise ESRCH. |
| 3035 | */ |
| 3036 | int |
| 3037 | prison_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. |
no test coverage detected