summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-29 03:00:31 +0000
committerderaadt <deraadt@openbsd.org>2015-10-29 03:00:31 +0000
commitb20c1e860f88ce4b7d25f12ea935e7bd52669654 (patch)
tree6e0c8d297f1c81e0ed7f754a2e91af8e1f131392
parentPretty sure this can pledge "stdio rpath wpath cpath". Commiting to start (diff)
downloadwireguard-openbsd-b20c1e860f88ce4b7d25f12ea935e7bd52669654.tar.xz
wireguard-openbsd-b20c1e860f88ce4b7d25f12ea935e7bd52669654.zip
pledge "stdio rpath".
-rw-r--r--usr.bin/last/last.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c
index 259b8d3c861..b6f8f55fa5b 100644
--- a/usr.bin/last/last.c
+++ b/usr.bin/last/last.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: last.c,v 1.49 2015/08/20 22:32:41 deraadt Exp $ */
+/* $OpenBSD: last.c,v 1.50 2015/10/29 03:00:31 deraadt Exp $ */
/* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */
/*
@@ -98,6 +98,9 @@ main(int argc, char *argv[])
const char *errstr;
int ch, lastch = '\0', newarg = 1, prevoptind = 1;
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "0123456789cf:h:n:st:d:T")) != -1) {
switch (ch) {
case '0': case '1': case '2': case '3': case '4':