From 2d5bdf5bc0e4714d42e5999a4e37553a6bf83575 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jan 2014 13:47:35 +0100 Subject: always use the same code for creating temporary files Let's unify our code here, and also always specifiy O_CLOEXEC. --- src/journal/journalctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/journal/journalctl.c') diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 2d99ade117..482795bd38 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -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; -- cgit v1.2.3-54-g00ecf