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

Function msg_prison_get

freebsd/kern/sysv_msg.c:1621–1639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1619}
1620
1621static int
1622msg_prison_get(void *obj, void *data)
1623{
1624 struct prison *pr = obj;
1625 struct prison *rpr;
1626 struct vfsoptlist *opts = data;
1627 int error, jsys;
1628
1629 /* Set sysvmsg based on the jail's root prison. */
1630 prison_lock(pr);
1631 rpr = osd_jail_get(pr, msg_prison_slot);
1632 prison_unlock(pr);
1633 jsys = rpr == NULL ? JAIL_SYS_DISABLE
1634 : rpr == pr ? JAIL_SYS_NEW : JAIL_SYS_INHERIT;
1635 error = vfs_setopt(opts, "sysvmsg", &jsys, sizeof(jsys));
1636 if (error == ENOENT)
1637 error = 0;
1638 return (error);
1639}
1640
1641static int
1642msg_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