-/* $OpenBSD: ps.c,v 1.65 2015/06/29 15:03:33 bluhm Exp $ */
+/* $OpenBSD: ps.c,v 1.66 2015/10/23 03:26:24 deraadt Exp $ */
/* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */
/*-
if (kd == NULL)
errx(1, "%s", errbuf);
+ if (pledge("stdio rpath ps", NULL) == -1)
+ err(1, "abort pledge");
+
if (!fmt) {
if (showthreads)
parsefmt(tfmt);
-/* $OpenBSD: top.c,v 1.83 2015/05/06 07:53:29 mpi Exp $ */
+/* $OpenBSD: top.c,v 1.84 2015/10/23 03:26:24 deraadt Exp $ */
/*
* Top users/processes display for Unix
preset_argc = 0;
} while (i != 0);
+ if (pledge("abort stdio rpath tty ps vminfo", NULL) == -1)
+ err(1, "pledge");
+
/* set constants for username/uid display correctly */
if (!do_unames) {
uname_field = " UID ";
-/* $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
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 == '-')