mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Create logfiles in mode 0640
Patch from toralf; closes 21729.
This commit is contained in:
parent
99ec44de45
commit
c000c7d118
7
changes/ticket21729
Normal file
7
changes/ticket21729
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
o Minor features (logging):
|
||||||
|
- Log files are no longer created world-readable by default.
|
||||||
|
(Previously, most distributors would store the logs in a
|
||||||
|
non-world-readable location to prevent inappropriate access. This
|
||||||
|
change is an extra precaution.) Closes ticket 21729; patch from
|
||||||
|
toralf.
|
||||||
|
|
@ -1086,7 +1086,7 @@ add_file_log(const log_severity_list_t *severity, const char *filename,
|
|||||||
int open_flags = O_WRONLY|O_CREAT;
|
int open_flags = O_WRONLY|O_CREAT;
|
||||||
open_flags |= truncate_log ? O_TRUNC : O_APPEND;
|
open_flags |= truncate_log ? O_TRUNC : O_APPEND;
|
||||||
|
|
||||||
fd = tor_open_cloexec(filename, open_flags, 0644);
|
fd = tor_open_cloexec(filename, open_flags, 0640);
|
||||||
if (fd<0)
|
if (fd<0)
|
||||||
return -1;
|
return -1;
|
||||||
if (tor_fd_seekend(fd)<0) {
|
if (tor_fd_seekend(fd)<0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user