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

Function sem_prison_cansee

freebsd/kern/sysv_sem.c:612–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612static int
613sem_prison_cansee(struct prison *rpr, struct semid_kernel *semakptr)
614{
615
616 if (semakptr->cred == NULL ||
617 !(rpr == semakptr->cred->cr_prison ||
618 prison_ischild(rpr, semakptr->cred->cr_prison)))
619 return (EINVAL);
620 return (0);
621}
622
623/*
624 * Note that the user-mode half of this passes a union, not a pointer.

Callers 4

semvalidFunction · 0.85
kern_semctlFunction · 0.85
sys_semopFunction · 0.85
sysctl_semaFunction · 0.85

Calls 1

prison_ischildFunction · 0.85

Tested by

no test coverage detected