artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf09a61
)
only modifies data, stdin to stdout, so tame "stdout"
author
deraadt
<deraadt@openbsd.org>
Tue, 6 Oct 2015 13:49:33 +0000
(13:49 +0000)
committer
deraadt
<deraadt@openbsd.org>
Tue, 6 Oct 2015 13:49:33 +0000
(13:49 +0000)
usr.bin/tr/tr.c
patch
|
blob
|
history
diff --git
a/usr.bin/tr/tr.c
b/usr.bin/tr/tr.c
index
c74fb1c
..
767660d
100644
(file)
--- a/
usr.bin/tr/tr.c
+++ b/
usr.bin/tr/tr.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: tr.c,v 1.1
7 2014/06/03 20:57:23 miller
t Exp $ */
+/* $OpenBSD: tr.c,v 1.1
8 2015/10/06 13:49:33 deraad
t 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) {