artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bc487a
)
Pledge that arithmetic only takes "stdio".
author
doug
<doug@openbsd.org>
Sat, 10 Oct 2015 22:32:55 +0000
(22:32 +0000)
committer
doug
<doug@openbsd.org>
Sat, 10 Oct 2015 22:32:55 +0000
(22:32 +0000)
games/arithmetic/arithmetic.c
patch
|
blob
|
history
diff --git
a/games/arithmetic/arithmetic.c
b/games/arithmetic/arithmetic.c
index
c7796e0
..
bd2bfd5
100644
(file)
--- 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': {