chiark / gitweb /
always use the same code for creating temporary files
[elogind.git] / src / journal / journalctl.c
index 2d99ade1172fdc33ef4ffb4a6793b24c575c2906..482795bd38a43be085e2e2c109434bafbd88bf00 100644 (file)
@@ -1286,7 +1286,7 @@ static int setup_keys(void) {
         n /= arg_interval;
 
         close_nointr_nofail(fd);
-        fd = mkostemp(k, O_WRONLY|O_CLOEXEC|O_NOCTTY);
+        fd = mkostemp_safe(k, O_WRONLY|O_CLOEXEC);
         if (fd < 0) {
                 log_error("Failed to open %s: %m", k);
                 r = -errno;