summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-11-26 08:27:16 +0000
committerphk <phk@FreeBSD.org>1999-11-26 08:27:16 +0000
commit5dbe9d95ba6c01dda4fc6674a04710414cd4ca33 (patch)
treec9a18340e1e69709e2663404bbe98cdd1b78ed8a /sys/fs
parent42632fd0a6ccbef70e0dce9f1ca707c8b8a71135 (diff)
downloadFreeBSD-src-5dbe9d95ba6c01dda4fc6674a04710414cd4ca33.zip
FreeBSD-src-5dbe9d95ba6c01dda4fc6674a04710414cd4ca33.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs_status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index e63a12b..ee3380e 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/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;
OpenPOWER on IntegriCloud