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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87024

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