Dont print the sysctl node tree unless you're root.
Found by: jkb (Yahoo OS troublemaker)
This commit is contained in:
parent
b9004c1158
commit
023a0e6100
@ -452,6 +452,11 @@ sysctl_sysctl_debug_dump_node(struct sysctl_oid_list *l, int i)
|
||||
static int
|
||||
sysctl_sysctl_debug(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = suser(req->td->td_proc);
|
||||
if (error)
|
||||
return error;
|
||||
sysctl_sysctl_debug_dump_node(&sysctl__children, 0);
|
||||
return ENOENT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user