diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-12 17:05:57 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-12 17:06:12 +0100 |
commit | 3c57c4d0031b7206ced8f313e3efa02dbcf88f78 (patch) | |
tree | b1dec8d32d8a2e2e74f2a48a870bb4ad680fb911 /src/usr.bin/vis/vis.c | |
parent | 166efa19c7ed5e13b1db524dd0b26fc48a56a2ee (diff) | |
download | outils-3c57c4d0031b7206ced8f313e3efa02dbcf88f78.tar.gz outils-3c57c4d0031b7206ced8f313e3efa02dbcf88f78.tar.xz outils-3c57c4d0031b7206ced8f313e3efa02dbcf88f78.zip |
cvs update v0.3
Diffstat (limited to 'src/usr.bin/vis/vis.c')
-rw-r--r-- | src/usr.bin/vis/vis.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr.bin/vis/vis.c b/src/usr.bin/vis/vis.c index fe40eed..cf5cd84 100644 --- a/src/usr.bin/vis/vis.c +++ b/src/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.19 2015/10/09 01:37:09 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 (pledge("stdio rpath", NULL) == -1) + err(1, "pledge"); + 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 (pledge("stdio", NULL) == -1) + err(1, "pledge"); process(stdin); + } exit(0); } |