include/fileutils: use O_CLOEXEC for mktemp stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
2ffad204c0
commit
7e3729e750
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue