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

Function sysctl_unprivileged_proc_debug

freebsd/kern/kern_prot.c:1643–1656  ·  view source on GitHub ↗

* Handle getting or setting the prison's unprivileged_proc_debug * value. */

Source from the content-addressed store, hash-verified

1641 * value.
1642 */
1643static int
1644sysctl_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

Callers

nothing calls this directly

Calls 3

prison_allowFunction · 0.85
sysctl_handle_intFunction · 0.85
prison_set_allowFunction · 0.85

Tested by

no test coverage detected