| 1619 | } |
| 1620 | |
| 1621 | static int |
| 1622 | msg_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 | |
| 1641 | static int |
| 1642 | msg_prison_remove(void *obj, void *data __unused) |
nothing calls this directly
no test coverage detected