sysctl_kern_proc_args: do not take the fast path if p_args is NULL
In this case it falls back to reading ps_strings
This commit is contained in:
parent
84874cc151
commit
1b25176cbc
@ -1920,11 +1920,9 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS)
|
|||||||
* is nobody to modify pargs, thus we can just read.
|
* is nobody to modify pargs, thus we can just read.
|
||||||
*/
|
*/
|
||||||
p = curproc;
|
p = curproc;
|
||||||
if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL) {
|
if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL &&
|
||||||
if ((pa = p->p_args) != NULL)
|
(pa = p->p_args) != NULL)
|
||||||
error = SYSCTL_OUT(req, pa->ar_args, pa->ar_length);
|
return (SYSCTL_OUT(req, pa->ar_args, pa->ar_length));
|
||||||
return (error);
|
|
||||||
}
|
|
||||||
|
|
||||||
flags = PGET_CANSEE;
|
flags = PGET_CANSEE;
|
||||||
if (req->newptr != NULL)
|
if (req->newptr != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user