Ignore TMPDIR if the application is setugid.

MFC after:	2 weeks
This commit is contained in:
Kris Kennaway 2002-10-13 11:22:16 +00:00
parent 57185ffa08
commit 61bdf123c3

View file

@ -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;