From: Miroslav Lichvar Date: Tue, 11 Feb 2020 11:37:57 +0000 (+0100) Subject: logging: restrict file log permissions X-Git-Tag: 4.0-pre1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=794cbfbbb54a87f6635fda4918c0ba451c09b87c;p=thirdparty%2Fchrony.git 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. --- diff --git a/logging.c b/logging.c index 87f263ed..9bcc0c5f 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; }