diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 2002-10-13 11:22:16 +0000 |
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 2002-10-13 11:22:16 +0000 |
| commit | 61bdf123c30ff94346dc23eb6bc241997efc21d6 (patch) | |
| tree | fec1c5d0224529df565ad6c4425eaab6495cc290 /lib/libc/stdio/tmpfile.c | |
| parent | 57185ffa087a0f27673c81c5e2d079ad1822c989 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/tmpfile.c')
| -rw-r--r-- | lib/libc/stdio/tmpfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c index 0c98ad3ee258..b38e0bca83b9 100644 --- a/lib/libc/stdio/tmpfile.c +++ b/lib/libc/stdio/tmpfile.c @@ -61,7 +61,8 @@ tmpfile() char *buf; const char *tmpdir; - tmpdir = getenv("TMPDIR"); + if (issetugid() == 0) + tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) tmpdir = _PATH_TMP; |
