summaryrefslogtreecommitdiff
path: root/usr.bin/w
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-23 03:26:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-23 03:26:25 +0000
commit06f6ed3b75bb3285267d48dbe0c8ad6305278073 (patch)
tree3a2e14feda2d9927390856e471edea8be0e8d3a1 /usr.bin/w
parent8b596664254048f8e38be8c8dd86709774d7e0f5 (diff)
With new pledge "ps" and "vminfo" requests, ps/top/w become possible.
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/w.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 762566a7675..596b2b48194 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w.c,v 1.59 2015/08/31 15:49:34 deraadt Exp $ */
+/* $OpenBSD: w.c,v 1.60 2015/10/23 03:26:24 deraadt Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -112,6 +112,9 @@ main(int argc, char *argv[])
char *memf, *nlistf, *p, *x;
char buf[HOST_NAME_MAX+1], errbuf[_POSIX2_LINE_MAX];
+ if (pledge("stdio tty rpath ps vminfo", NULL) == -1)
+ err(1, "pledge");
+
/* Are we w(1) or uptime(1)? */
p = __progname;
if (*p == '-')