fileio: simplify mkostemp_safe() (#4090)
authorTopi Miettinen <topimiettinen@users.noreply.github.com>
Tue, 13 Sep 2016 06:20:38 +0000 (06:20 +0000)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Sep 2016 06:20:38 +0000 (08:20 +0200)
commit646853bdd8b1337204643aa014ff3f1f49d91a4f
treeaaeea183f1648a27916dc36f7c0e4468f6039faf
parentacb986015d9def3dd65a99ea4f0f893af44c6fc3
fileio: simplify mkostemp_safe() (#4090)

According to its manual page, flags given to mkostemp(3) shouldn't include
O_RDWR, O_CREAT or O_EXCL flags as these are always included. Beyond
those, the only flag that all callers (except a few tests where it
probably doesn't matter) use is O_CLOEXEC, so set that unconditionally.
22 files changed:
src/basic/fileio.c
src/basic/fileio.h
src/coredump/coredumpctl.c
src/journal/journalctl.c
src/journal/test-catalog.c
src/journal/test-compress.c
src/journal/test-mmap-cache.c
src/shared/ask-password-api.c
src/test/test-acl-util.c
src/test/test-async.c
src/test/test-clock.c
src/test/test-copy.c
src/test/test-fd-util.c
src/test/test-fdset.c
src/test/test-fileio.c
src/test/test-fs-util.c
src/test/test-glob-util.c
src/test/test-hostname-util.c
src/test/test-stat-util.c
src/test/test-terminal-util.c
src/test/test-tmpfiles.c
src/test/test-unit-file.c