| 67 | } |
| 68 | |
| 69 | static int |
| 70 | sysctl_kern_suser_enabled(SYSCTL_HANDLER_ARGS) |
| 71 | { |
| 72 | struct ucred *cred; |
| 73 | int error, enabled; |
| 74 | |
| 75 | cred = req->td->td_ucred; |
| 76 | enabled = suser_enabled(cred); |
| 77 | error = sysctl_handle_int(oidp, &enabled, 0, req); |
| 78 | if (error || !req->newptr) |
| 79 | return (error); |
| 80 | prison_set_allow(cred, PR_ALLOW_SUSER, enabled); |
| 81 | return (0); |
| 82 | } |
| 83 | |
| 84 | SYSCTL_PROC(_security_bsd, OID_AUTO, suser_enabled, CTLTYPE_INT | |
| 85 | CTLFLAG_RWTUN | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0, |
nothing calls this directly
no test coverage detected