mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87024
|
@ -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 a new issue