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

Function shm_prison_cansee

freebsd/kern/sysv_shm.c:321–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321static int
322shm_prison_cansee(struct prison *rpr, struct shmid_kernel *shmseg)
323{
324
325 if (shmseg->cred == NULL ||
326 !(rpr == shmseg->cred->cr_prison ||
327 prison_ischild(rpr, shmseg->cred->cr_prison)))
328 return (EINVAL);
329 return (0);
330}
331
332static int
333kern_shmdt_locked(struct thread *td, const void *shmaddr)

Callers 2

shm_find_segmentFunction · 0.85
sysctl_shmsegsFunction · 0.85

Calls 1

prison_ischildFunction · 0.85

Tested by

no test coverage detected