diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2015-10-22 05:28:43 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2015-10-22 05:28:43 +0000 |
commit | 0eb9d4d3603c7569d7b7537c9c8feef639b147a4 (patch) | |
tree | 51a2147e482029ec711789018098d0f4b4aca07c /games | |
parent | 0bb1384abeda58e2abe5a12bbf93dd68d6f345fa (diff) |
Pledge "stdio rpath tty" for hangman(6).
Patch submitted by Ricardo Mestre <serial@helheim.mooo.com>
ok semarie@
Diffstat (limited to 'games')
-rw-r--r-- | games/hangman/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/games/hangman/main.c b/games/hangman/main.c index 5e140e736a7..6229ecb559d 100644 --- a/games/hangman/main.c +++ b/games/hangman/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.12 2015/02/07 01:37:30 miod Exp $ */ +/* $OpenBSD: main.c,v 1.13 2015/10/22 05:28:42 doug Exp $ */ /* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */ /* @@ -43,6 +43,9 @@ main(int argc, char *argv[]) { int ch; + if (pledge("stdio rpath tty", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "d:hk")) != -1) { switch (ch) { case 'd': @@ -69,6 +72,10 @@ main(int argc, char *argv[]) } signal(SIGINT, die); setup(); + + if (pledge("stdio tty", NULL) == -1) + err(1, "pledge"); + for (;;) { Wordnum++; playgame(); |