From 794cbfbbb54a87f6635fda4918c0ba451c09b87c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 11 Feb 2020 12:37:57 +0100 Subject: [PATCH] logging: restrict file log permissions With the new file utility functions permissions can be restricted for newly created files. For the log file specified by the -l option it is better to remove the "other" permissions (0640) to make it similar to the system log. --- logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging.c b/logging.c index 87f263e..9bcc0c5 100644 --- a/logging.c +++ b/logging.c @@ -186,7 +186,7 @@ LOG_OpenFileLog(const char *log_file) FILE *f; if (log_file) { - f = UTI_OpenFile(NULL, log_file, NULL, 'A', 0644); + f = UTI_OpenFile(NULL, log_file, NULL, 'A', 0640); } else { f = stderr; }