summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorTopi Miettinen <topimiettinen@users.noreply.github.com>2016-09-13 06:20:38 +0000
committerMartin Pitt <martin.pitt@ubuntu.com>2016-09-13 08:20:38 +0200
commit646853bdd8b1337204643aa014ff3f1f49d91a4f (patch)
treeaaeea183f1648a27916dc36f7c0e4468f6039faf /src/shared
parentacb986015d9def3dd65a99ea4f0f893af44c6fc3 (diff)
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.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ask-password-api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index 65151b19a6..2597cfc648 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -484,7 +484,7 @@ int ask_password_agent(
(void) mkdir_p_label("/run/systemd/ask-password", 0755);
- fd = mkostemp_safe(temp, O_WRONLY|O_CLOEXEC);
+ fd = mkostemp_safe(temp);
if (fd < 0) {
r = fd;
goto finish;