summaryrefslogtreecommitdiff
path: root/games/random
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-10-14 08:12:13 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-10-14 08:12:13 +0000
commit724d760f63c5382d1d6f9b5f3cbaf200e625f288 (patch)
treeabe8b7d72500d5384fe7f3a0a4b35eb420d30fe4 /games/random
parent9697e0e3c9e7331691283fff518f3fdc00ae643a (diff)
Pledge "stdio" for simple games.
ok semarie@
Diffstat (limited to 'games/random')
-rw-r--r--games/random/random.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/games/random/random.c b/games/random/random.c
index 2cf7d655150..ee5ce052bbe 100644
--- a/games/random/random.c
+++ b/games/random/random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: random.c,v 1.12 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: random.c,v 1.13 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
@@ -54,6 +54,9 @@ main(int argc, char *argv[])
int ch, random_exit, selected, unbuffer_output;
char *ep;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
random_exit = unbuffer_output = 0;
while ((ch = getopt(argc, argv, "erh")) != -1)
switch (ch) {