summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <tb@cvs.openbsd.org>2015-11-30 08:14:49 +0000
committertb <tb@cvs.openbsd.org>2015-11-30 08:14:49 +0000
commit5235f6aa6f4559e796a8d4ba43c4cce75d2640ef (patch)
tree07bc62a258159880e47c3821ee028eec0d7c4094
parenta0aa8f6abd880f8ab0782ebf614087e4d34f4809 (diff)
Straightforward pledge "stdio rpath wpath cpath" for adventure.
It is possible to make it finer grained, but try to keep it simple for now.
-rw-r--r--games/adventure/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/games/adventure/main.c b/games/adventure/main.c
index 56318222bc2..61c0bcd43ed 100644
--- a/games/adventure/main.c
+++ b/games/adventure/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.20 2014/11/16 04:49:48 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.21 2015/11/30 08:14:48 tb Exp $ */
/* $NetBSD: main.c,v 1.5 1996/05/21 21:53:09 mrg Exp $ */
/*-
@@ -52,6 +52,9 @@ main(int argc, char *argv[])
int rval, ll;
struct text *kk;
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ err(1, "pledge");
+
init(); /* Initialize everything */
signal(SIGINT, trapdel);