Patch from toralf; closes 21729.
--- /dev/null
+ 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.
+
int open_flags = O_WRONLY|O_CREAT;
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)
return -1;
if (tor_fd_seekend(fd)<0) {