summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-10-10 22:32:56 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-10-10 22:32:56 +0000
commitd1c21f32a37aeba33bbbd477b41bdec5f9db27a7 (patch)
tree8542b278a12c097bac6ad3c49e4909e24e7916bb /games
parentf3387a448636cc68a1b808bebb2d1be7dc9fdb1a (diff)
Pledge that arithmetic only takes "stdio".
Diffstat (limited to 'games')
-rw-r--r--games/arithmetic/arithmetic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c
index c7796e0986a..bd2bfd5ce6c 100644
--- a/games/arithmetic/arithmetic.c
+++ b/games/arithmetic/arithmetic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arithmetic.c,v 1.19 2015/08/22 14:47:41 deraadt Exp $ */
+/* $OpenBSD: arithmetic.c,v 1.20 2015/10/10 22:32:55 doug Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -101,6 +101,9 @@ main(int argc, char *argv[])
extern int optind;
int ch, cnt;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "hr:o:")) != -1)
switch(ch) {
case 'o': {