From 724d760f63c5382d1d6f9b5f3cbaf200e625f288 Mon Sep 17 00:00:00 2001 From: Doug Hogan Date: Wed, 14 Oct 2015 08:12:13 +0000 Subject: Pledge "stdio" for simple games. ok semarie@ --- games/random/random.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'games/random') 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) { -- cgit v1.2.3