summaryrefslogtreecommitdiff
path: root/usr.bin/vis/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/vis/vis.c')
-rw-r--r--usr.bin/vis/vis.c10
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);
}