Dont print the sysctl node tree unless you're root.

Found by:	jkb (Yahoo OS troublemaker)
This commit is contained in:
Peter Wemm 2001-11-28 03:11:16 +00:00
parent b9004c1158
commit 023a0e6100

View File

@ -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;
}