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:
Pawel Jakub Dawidek 2004-04-01 00:04:23 +00:00
parent 8ed0d42fe4
commit c5b7c33bc8
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

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