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

Function sysctl_kern_suser_enabled

freebsd/kern/kern_priv.c:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static int
70sysctl_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
84SYSCTL_PROC(_security_bsd, OID_AUTO, suser_enabled, CTLTYPE_INT |
85 CTLFLAG_RWTUN | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0,

Callers

nothing calls this directly

Calls 3

suser_enabledFunction · 0.85
sysctl_handle_intFunction · 0.85
prison_set_allowFunction · 0.85

Tested by

no test coverage detected