include/fileutils: use O_CLOEXEC for mktemp stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2013-04-03 16:12:34 +02:00
parent 2ffad204c0
commit 7e3729e750
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ static inline FILE *xfmkstemp(char **tmpname, char *dir)
if (fd == -1) {
return NULL;
}
if (!(ret = fdopen(fd, "w+"))) {
if (!(ret = fdopen(fd, "w+" UL_CLOEXECSTR))) {
close(fd);
return NULL;
}