From a8704f89991b36fd7bf24e7faab7543ac6263083 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 26 Nov 1999 08:27:16 +0000 Subject: Add a sysctl to control if argv is disclosed to the world: kern.ps_argsopen It defaults to 1 which means that all users can see all argvs in ps(1). Reviewed by: Warner --- sys/miscfs/procfs/procfs_status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/miscfs/procfs/procfs_status.c') diff --git a/sys/miscfs/procfs/procfs_status.c b/sys/miscfs/procfs/procfs_status.c index e63a12bcbeb5..ee3380e6c021 100644 --- a/sys/miscfs/procfs/procfs_status.c +++ b/sys/miscfs/procfs/procfs_status.c @@ -183,7 +183,7 @@ procfs_docmdline(curp, p, pfs, uio) * Linux behaviour is to return zero-length in this case. */ - if (p->p_args && !p_trespass(curp, p)) { + if (p->p_args && (ps_argsopen ||!p_trespass(curp, p))) { bp = p->p_args->ar_args; buflen = p->p_args->ar_length; buf = 0; -- cgit v1.2.3