summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-10 21:29:59 +0000
committerderaadt <deraadt@openbsd.org>2015-10-10 21:29:59 +0000
commitfc67ef4b4a49d63c1e9009c7f95f39ed9abaea3c (patch)
treedcca476d3a6f82786ca077e14a848745d2602782
parentenv(1) is obviously a program falling into pledge "stdio exec". It (diff)
downloadwireguard-openbsd-fc67ef4b4a49d63c1e9009c7f95f39ed9abaea3c.tar.xz
wireguard-openbsd-fc67ef4b4a49d63c1e9009c7f95f39ed9abaea3c.zip
pledge "stdio rpath wpath cpath"
ok doug
-rw-r--r--usr.bin/gencat/gencat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/gencat/gencat.c b/usr.bin/gencat/gencat.c
index 0a0dfd6a93a..0dcdd81c1b1 100644
--- a/usr.bin/gencat/gencat.c
+++ b/usr.bin/gencat/gencat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencat.c,v 1.17 2014/11/18 20:54:28 krw Exp $ */
+/* $OpenBSD: gencat.c,v 1.18 2015/10/10 21:29:59 deraadt Exp $ */
/* $NetBSD: gencat.c,v 1.9 1998/10/09 17:00:56 itohy Exp $ */
/*-
@@ -134,6 +134,9 @@ main(int argc, char *argv[])
char *catfile = NULL;
int c;
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ err(1, "pledge");
+
while ((c = getopt(argc, argv, "")) != -1) {
switch (c) {
case '?':