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

Function sem_prison_get

freebsd/kern/sysv_sem.c:1675–1693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673}
1674
1675static int
1676sem_prison_get(void *obj, void *data)
1677{
1678 struct prison *pr = obj;
1679 struct prison *rpr;
1680 struct vfsoptlist *opts = data;
1681 int error, jsys;
1682
1683 /* Set sysvsem based on the jail's root prison. */
1684 prison_lock(pr);
1685 rpr = osd_jail_get(pr, sem_prison_slot);
1686 prison_unlock(pr);
1687 jsys = rpr == NULL ? JAIL_SYS_DISABLE
1688 : rpr == pr ? JAIL_SYS_NEW : JAIL_SYS_INHERIT;
1689 error = vfs_setopt(opts, "sysvsem", &jsys, sizeof(jsys));
1690 if (error == ENOENT)
1691 error = 0;
1692 return (error);
1693}
1694
1695static int
1696sem_prison_remove(void *obj, void *data __unused)

Callers

nothing calls this directly

Calls 3

prison_lockFunction · 0.85
prison_unlockFunction · 0.85
vfs_setoptFunction · 0.85

Tested by

no test coverage detected