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.
This commit is contained in:
Miroslav Lichvar 2020-02-11 12:37:57 +01:00
parent 1858104b5c
commit 794cbfbbb5

View file

@ -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;
}