Remove ps_argsopen from this check, because of two reasons:
1. This check if wrong, because it is true by default (kern.ps_argsopen is 1 by default) (p_cansee() is not even checked). 2. Sysctl kern.ps_argsopen is going away.
This commit is contained in:
parent
8ed0d42fe4
commit
c5b7c33bc8
@ -771,7 +771,7 @@ linprocfs_doproccmdline(PFS_FILL_ARGS)
|
||||
*/
|
||||
|
||||
PROC_LOCK(p);
|
||||
if (p->p_args && (ps_argsopen || !p_cansee(td, p))) {
|
||||
if (p->p_args && p_cansee(td, p) == 0) {
|
||||
sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
|
||||
PROC_UNLOCK(p);
|
||||
} else if (p != td->td_proc) {
|
||||
|
@ -191,7 +191,7 @@ procfs_doproccmdline(PFS_FILL_ARGS)
|
||||
*/
|
||||
|
||||
PROC_LOCK(p);
|
||||
if (p->p_args && (ps_argsopen || !p_cansee(td, p))) {
|
||||
if (p->p_args && p_cansee(td, p) == 0) {
|
||||
sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
|
||||
PROC_UNLOCK(p);
|
||||
return (0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user