summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-07 17:21:03 -0400
committerDaniel Mack <daniel@zonque.org>2015-07-07 17:21:27 -0400
commit9e19c04f3a4e03e37dc89b63c1ae9b0a7c611810 (patch)
tree76d545cba5c18cbbed2333b0154201a7fb819b5b
parent9a50ce20ef60263a6c88c29470ce761fcc424f2d (diff)
journal-gatewayd: fix tmpfile logic
"rw" is not a valid mode string for f*open(). This got broken in cc02a7b33049 ("journal-gatewayd: factor out opening of temp file").
-rw-r--r--src/journal-remote/journal-gatewayd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index d9450ae8cd..9a09f401e0 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -132,7 +132,7 @@ static int request_meta_ensure_tmp(RequestMeta *m) {
if (fd < 0)
return fd;
- m->tmp = fdopen(fd, "rw");
+ m->tmp = fdopen(fd, "w+");
if (!m->tmp) {
safe_close(fd);
return -errno;