X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/503f163446bf4ba8a8cd0f521a24e5ef1e6c872e..ac98cd98e361d7703a9e8411aa7102613a6fb025:/log.c diff --git a/log.c b/log.c index 72a28370..135a57a1 100644 --- a/log.c +++ b/log.c @@ -45,6 +45,7 @@ extern int preserve_times; extern int log_format_has_i; extern int log_format_has_o_or_i; extern int daemon_log_format_has_o_or_i; +extern mode_t orig_umask; extern char *auth_user; extern char *log_format; #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H @@ -143,8 +144,7 @@ static void syslog_init() static void logfile_open(void) { - extern int orig_umask; - int old_umask = umask(022 | orig_umask); + mode_t old_umask = umask(022 | orig_umask); logfile = fopen(logfname, "a"); umask(old_umask); if (!logfile) { @@ -769,11 +769,11 @@ void log_exit(int code, const char *file, int line) /* VANISHED is not an error, only a warning */ if (code == RERR_VANISHED) { - rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d) [%s]\n", - name, code, file, line, who_am_i()); + rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n", + name, code, file, line, who_am_i(), RSYNC_VERSION); } else { - rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s]\n", - name, code, file, line, who_am_i()); + rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n", + name, code, file, line, who_am_i(), RSYNC_VERSION); } } }