From 9b4dd318cbfbfbaac771dce8d19eed60caca0530 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Oct 2015 14:37:11 +0000 Subject: [PATCH] tame "stdio rpath wpath cpath" to support use of freopen() with "w" --- usr.bin/split/split.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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': -- 2.20.1