mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-09-23 18:55:04 -04:00
Made log_init() call timestring() instead of just localtime() prior to a
chroot (note that timestring() makes use of localtime() plus strftime()).
This commit is contained in:
1 parent
bdac7621ee
commit
38de2866e5
1 file changed
+3
-6
@@ -154,17 +154,14 @@ static void logfile_open(void)
|
||||
|
||||
void log_init(void)
|
||||
{
|
||||
time_t t;
|
||||
|
||||
if (log_initialised)
|
||||
return;
|
||||
log_initialised = 1;
|
||||
|
||||
/* this looks pointless, but it is needed in order for the
|
||||
/* This looks pointless, but it is needed in order for the
|
||||
* C library on some systems to fetch the timezone info
|
||||
* before the chroot */
|
||||
t = time(NULL);
|
||||
localtime(&t);
|
||||
* before the chroot. */
|
||||
timestring(time(NULL));
|
||||
|
||||
/* optionally use a log file instead of syslog */
|
||||
logfname = lp_log_file();
|
||||
|
||||
Reference in new issue
Block a user