* Handle getting or setting the prison's unprivileged_proc_debug * value. */
| 1641 | * value. |
| 1642 | */ |
| 1643 | static int |
| 1644 | sysctl_unprivileged_proc_debug(SYSCTL_HANDLER_ARGS) |
| 1645 | { |
| 1646 | int error, val; |
| 1647 | |
| 1648 | val = prison_allow(req->td->td_ucred, PR_ALLOW_UNPRIV_DEBUG); |
| 1649 | error = sysctl_handle_int(oidp, &val, 0, req); |
| 1650 | if (error != 0 || req->newptr == NULL) |
| 1651 | return (error); |
| 1652 | if (val != 0 && val != 1) |
| 1653 | return (EINVAL); |
| 1654 | prison_set_allow(req->td->td_ucred, PR_ALLOW_UNPRIV_DEBUG, val); |
| 1655 | return (0); |
| 1656 | } |
| 1657 | |
| 1658 | /* |
| 1659 | * The 'unprivileged_proc_debug' flag may be used to disable a variety of |
nothing calls this directly
no test coverage detected