X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/958f373550a93532a2df9c7f5242befb29f3a6e8..e803090538b1f5e432226438d4e804fea40b7eea:/log.c diff --git a/log.c b/log.c index 30aca47e..32ae3552 100644 --- a/log.c +++ b/log.c @@ -78,7 +78,10 @@ void log_open(void) /* optionally use a log file instead of syslog */ logf = lp_log_file(); if (logf && *logf) { + extern int orig_umask; + int old_umask = umask(022 | orig_umask); logfile = fopen(logf, "a"); + umask(old_umask); return; }