From 03d5b273982406593b976c1487e81f6401acba26 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 9 Feb 2016 13:52:56 +0100 Subject: degesch: use mkstemp() with a safe umask --- degesch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/degesch.c b/degesch.c index c509d96..7d01ef9 100644 --- a/degesch.c +++ b/degesch.c @@ -11251,7 +11251,10 @@ display_full_log (struct app_context *ctx) static bool dump_input_to_file (struct app_context *ctx, char *template, struct error **e) { + mode_t mask = umask (S_IXUSR | S_IRWXG | S_IRWXO); int fd = mkstemp (template); + (void) umask (mask); + if (fd < 0) FAIL ("%s", strerror (errno)); -- cgit v1.2.3-70-g09d2