diff options
| author | 2015-10-05 06:59:18 +0000 | |
|---|---|---|
| committer | 2015-10-05 06:59:18 +0000 | |
| commit | 3b804fcf6f51473a3629623ecade996235ba91d8 (patch) | |
| tree | f3063a9bdfbdc1a243ca2694363fdb276e0a0dad | |
| parent | tame "stdio rpath wpath cpath fattr", because this creates new files, (diff) | |
| download | wireguard-openbsd-3b804fcf6f51473a3629623ecade996235ba91d8.tar.xz wireguard-openbsd-3b804fcf6f51473a3629623ecade996235ba91d8.zip | |
tame "stdio rpath" initially; if we find out the only file operated on
is stdin, then we can drop directly to tame "stdio"
ok doug
| -rw-r--r-- | usr.bin/vis/vis.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c index fe40eed012d..869660d3898 100644 --- a/usr.bin/vis/vis.c +++ b/usr.bin/vis/vis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vis.c,v 1.17 2015/04/18 18:28:38 deraadt Exp $ */ +/* $OpenBSD: vis.c,v 1.18 2015/10/05 06:59:18 deraadt Exp $ */ /* $NetBSD: vis.c,v 1.4 1994/12/20 16:13:03 jtc Exp $ */ /*- @@ -55,6 +55,9 @@ main(int argc, char *argv[]) FILE *fp; int ch; + if (tame("stdio rpath", NULL) == -1) + err(1, "tame"); + while ((ch = getopt(argc, argv, "anwctsobfF:ld")) != -1) switch(ch) { case 'a': @@ -114,8 +117,11 @@ main(int argc, char *argv[]) warn("%s", *argv); argv++; } - else + else { + if (tame("stdio", NULL) == -1) + err(1, "tame"); process(stdin); + } exit(0); } |
