summaryrefslogtreecommitdiffstats
path: root/usr.bin/unexpand
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-10 14:23:46 +0000
committerderaadt <deraadt@openbsd.org>2015-10-10 14:23:46 +0000
commitd310ad95fe6a0db91654b092b40c1c5490b3a82c (patch)
tree391b605abdf6aef5a2eab8386830d5aa23f876a1 /usr.bin/unexpand
parentfairly simple pledge to "stdio rpath wpath cpath" (diff)
downloadwireguard-openbsd-d310ad95fe6a0db91654b092b40c1c5490b3a82c.tar.xz
wireguard-openbsd-d310ad95fe6a0db91654b092b40c1c5490b3a82c.zip
fairly obvious pledges.
ok doug
Diffstat (limited to 'usr.bin/unexpand')
-rw-r--r--usr.bin/unexpand/unexpand.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/unexpand/unexpand.c b/usr.bin/unexpand/unexpand.c
index 89e4f23f3fa..e61e61d1211 100644
--- a/usr.bin/unexpand/unexpand.c
+++ b/usr.bin/unexpand/unexpand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unexpand.c,v 1.10 2009/10/27 23:59:46 deraadt Exp $ */
+/* $OpenBSD: unexpand.c,v 1.11 2015/10/10 14:23:46 deraadt Exp $ */
/* $NetBSD: unexpand.c,v 1.5 1994/12/24 17:08:05 cgd Exp $ */
/*-
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
char genbuf[BUFSIZ];
char linebuf[BUFSIZ];
@@ -48,6 +49,9 @@ main(int argc, char *argv[])
{
char *cp;
+ if (pledge("stdio rpath", NULL) == -1)
+ perror("pledge");
+
argc--, argv++;
if (argc > 0 && argv[0][0] == '-') {
if (strcmp(argv[0], "-a") != 0) {