summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 14:37:11 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 14:37:11 +0000
commit9b4dd318cbfbfbaac771dce8d19eed60caca0530 (patch)
treefc810dccc4e56e70050cf4ce7da9e2885865d56e
parenttame "stdio inet rpath wpath cpath" supports all the functions of tftp. (diff)
downloadwireguard-openbsd-9b4dd318cbfbfbaac771dce8d19eed60caca0530.tar.xz
wireguard-openbsd-9b4dd318cbfbfbaac771dce8d19eed60caca0530.zip
tame "stdio rpath wpath cpath" to support use of freopen() with "w"
-rw-r--r--usr.bin/split/split.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c
index 27a75d5c449..d0306e57629 100644
--- a/usr.bin/split/split.c
+++ b/usr.bin/split/split.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: split.c,v 1.18 2015/01/16 06:40:12 deraadt Exp $ */
+/* $OpenBSD: split.c,v 1.19 2015/10/07 14:37:11 deraadt Exp $ */
/* $NetBSD: split.c,v 1.5 1995/08/31 22:22:05 jtc Exp $ */
/*
@@ -68,6 +68,9 @@ main(int argc, char *argv[])
char *ep, *p;
const char *errstr;
+ if (tame("stdio rpath wpath cpath", NULL) == -1)
+ err(1, "tame");
+
while ((ch = getopt(argc, argv, "0123456789a:b:l:p:-")) != -1)
switch (ch) {
case '0': case '1': case '2': case '3': case '4':