diff options
author | 2015-12-01 00:31:46 +0000 | |
---|---|---|
committer | 2015-12-01 00:31:46 +0000 | |
commit | 1f22a2a0913f1dfd54593201e21dd612a003fef5 (patch) | |
tree | 05817e5868bb0ac6581ef6329b5de81db8164e49 | |
parent | We no longer need pledge "wpath" since "tty" allows read-write on (diff) | |
download | wireguard-openbsd-1f22a2a0913f1dfd54593201e21dd612a003fef5.tar.xz wireguard-openbsd-1f22a2a0913f1dfd54593201e21dd612a003fef5.zip |
Answering "yes" to the question "Do you want to see the rules of the game?"
execs teachgammon. Allow this and drop this pledge afterward.
Spotted by Paul Janzen, thanks!
-rw-r--r-- | games/backgammon/backgammon/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/games/backgammon/backgammon/main.c b/games/backgammon/backgammon/main.c index b3e6a62abbf..f1742439f25 100644 --- a/games/backgammon/backgammon/main.c +++ b/games/backgammon/backgammon/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.19 2015/11/30 08:19:25 tb Exp $ */ +/* $OpenBSD: main.c,v 1.20 2015/12/01 00:31:46 tb Exp $ */ /* * Copyright (c) 1980, 1993 @@ -86,7 +86,7 @@ main (int argc, char **argv) int i,l; /* non-descript indices */ char c; /* non-descript character storage */ - if (pledge("stdio rpath tty", NULL) == -1) + if (pledge("stdio rpath tty exec", NULL) == -1) err(1, "pledge"); signal(SIGINT, getout); /* trap interrupts */ @@ -131,6 +131,10 @@ main (int argc, char **argv) } } } + + if (pledge("stdio rpath tty", NULL) == -1) + err(1, "pledge"); + init(); /* initialize board */ if (pnum == 2) {/* ask for color(s) */ |