diff options
| author | Karel Zak <kzak@redhat.com> | 2013-04-03 16:12:34 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2013-04-03 16:12:34 +0200 |
| commit | 7e3729e7509ce25b2f9eb5a78f35232b6cd9b998 (patch) | |
| tree | f7a4433746edfd3f3a3d82e5a1adf9d846725fa8 | |
| parent | 2ffad204c0c78009a497b093f9c9bbc148c6ed9a (diff) | |
| download | util-linux-7e3729e7509ce25b2f9eb5a78f35232b6cd9b998.tar.gz | |
include/fileutils: use O_CLOEXEC for mktemp stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
| -rw-r--r-- | include/fileutils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fileutils.h b/include/fileutils.h index cf29e1b83d..d0d4505cdb 100644 --- a/include/fileutils.h +++ b/include/fileutils.h @@ -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; } |
