summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-06 13:49:33 +0000
committerderaadt <deraadt@openbsd.org>2015-10-06 13:49:33 +0000
commit48adfa3dbdcb53bdfd79455f968106400d4431d1 (patch)
tree20d50d9317a60e4d37d310887eb35d3278938aab
parentuse tame "stdio rpath wpath cpath fattr". There is some timezone (diff)
downloadwireguard-openbsd-48adfa3dbdcb53bdfd79455f968106400d4431d1.tar.xz
wireguard-openbsd-48adfa3dbdcb53bdfd79455f968106400d4431d1.zip
only modifies data, stdin to stdout, so tame "stdout"
-rw-r--r--usr.bin/tr/tr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c
index c74fb1c4801..767660d57e8 100644
--- a/usr.bin/tr/tr.c
+++ b/usr.bin/tr/tr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tr.c,v 1.17 2014/06/03 20:57:23 millert Exp $ */
+/* $OpenBSD: tr.c,v 1.18 2015/10/06 13:49:33 deraadt Exp $ */
/* $NetBSD: tr.c,v 1.5 1995/08/31 22:13:48 jtc Exp $ */
/*
@@ -87,6 +87,9 @@ main(int argc, char *argv[])
int ch, cnt, lastch, *p;
int cflag, dflag, sflag, isstring2;
+ if (tame("stdio", NULL) == -1)
+ err(1, "tame");
+
cflag = dflag = sflag = 0;
while ((ch = getopt(argc, argv, "Ccds")) != -1)
switch(ch) {