aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/tmpfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/tmpfile.c')
-rw-r--r--lib/libc/stdio/tmpfile.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c
index e5ee1be2884e..d3331b8c2c2d 100644
--- a/lib/libc/stdio/tmpfile.c
+++ b/lib/libc/stdio/tmpfile.c
@@ -32,12 +32,6 @@
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)tmpfile.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "namespace.h"
#include <sys/types.h>
#include <signal.h>
@@ -60,9 +54,7 @@ tmpfile(void)
char *buf;
const char *tmpdir;
- tmpdir = NULL;
- if (issetugid() == 0)
- tmpdir = getenv("TMPDIR");
+ tmpdir = secure_getenv("TMPDIR");
if (tmpdir == NULL)
tmpdir = _PATH_TMP;