From: deraadt Date: Wed, 7 Oct 2015 06:43:15 +0000 (+0000) Subject: tame "stdio rpath wpath cpath" covers mkstemp (O_RDONLY|O_CREAT), X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9e824d363a1e5c822075a353b96508f25d153277;p=openbsd tame "stdio rpath wpath cpath" covers mkstemp (O_RDONLY|O_CREAT), mkdtemp(), and unlink() --- diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c index 8e0ab148aca..6355c193aa9 100644 --- a/usr.bin/mktemp/mktemp.c +++ b/usr.bin/mktemp/mktemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mktemp.c,v 1.20 2013/08/06 21:56:51 landry Exp $ */ +/* $OpenBSD: mktemp.c,v 1.21 2015/10/07 06:43:15 deraadt Exp $ */ /* * Copyright (c) 1996, 1997, 2001-2003, 2013 @@ -38,6 +38,9 @@ main(int argc, char *argv[]) char *cp, *template, *tempfile, *prefix = _PATH_TMP; size_t len; + if (tame("stdio rpath wpath cpath", NULL) == -1) + err(1, "tame"); + while ((ch = getopt(argc, argv, "dp:qtu")) != -1) switch(ch) { case 'd':