Eberhard Moenkeberg
2005-Jan-12 22:56 UTC
Timezone error with chrooted rsync version 2.6.3pre1
Hi, I am not sure it this still is a point, but I just discovered that a chrooted rsync version 2.6.3pre1 is forgetting the time zone underways: Jan 12 07:00:01 ftp4 rsyncd[11091]: rsync on dobes/ from dobes@edoc1.gwdg.de (134.76.28.251) Jan 12 06:00:39 ftp4 rsyncd[11091]: wrote 732542 bytes read 182 bytes total size 553909487945 Logging is done with syslog. Time zone is GMT+1, the system is set up to run the hardware clock as GMT. You see, the session is starting under the correct time, but after chrooting and doing the work, time zone info "+1" is lost. This does not happen on a different system (same setup) with rsync version 2.6.2: Jan 12 00:00:08 ftp rsyncd[1090]: rsync on pub/linux/suse/ftp.suse.com/suse/i386/update/9.1 from email.medizinische-genetik.de (62.245.197.183) Jan 12 00:00:10 ftp rsyncd[1090]: wrote 82006 bytes read 117 bytes total size 1327942093 Cheers -e -- Eberhard Moenkeberg (emoenke@gwdg.de, em@kki.org)
On Wed, Jan 12, 2005 at 11:56:24PM +0100, Eberhard Moenkeberg wrote:> I am not sure it this still is a point, but I just discovered that a > chrooted rsync version 2.6.3pre1 is forgetting the time zone underways: > [...] Logging is done with syslog.I have tested 2.6.3 on my Debian Sarge box w/rsync 2.6.3, and I cannot reproduce this (yes, my clock is set to UTC). I normally have "TZ" defined in my environment ("PST8PDT"), but unsetting this had no effect. I tested both syslog and direct logging. Note that rsync does nothing to manipulate the timezone directly, but it does ensure that log_init() is called prior to calling chroot(), and this ensures that one call to localtime() occurs before the chroot() (which should load the timezone for any future calls) and that openlog() gets called (to initialize any syslog() calls to follow).> Jan 12 07:00:01 ftp4 rsyncd[11091]: rsync on dobes/ from dobes@edoc1.gwdg.de (134.76.28.251) > Jan 12 06:00:39 ftp4 rsyncd[11091]: wrote 732542 bytes read 182 bytes total size 553909487945FYI, *both* those log lines get output *after* chroot() gets called. So there has to be something else besides chroot() that is the real culprit in the loss of the timezone on this system. I'd recommend upgrading to 2.6.3 and see if the problem persists. If so, the only other thing I can think to try is to run the daemon under something like valgrind and see if it reports any memory-access problems on your system (you might want to try this with the current 2.6.3pre1 too): valgrind rsync --daemon --no-detach I've run this command in my setup, and it reports no errors. ..wayne..