summaryrefslogtreecommitdiff
path: root/usr.bin/w/w.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/w/w.c')
-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 == '-')