[Bug 8198] New: rsync does not set TZ variable after chroot(), which confuses logging timestamps

Michael Tokarev mjt at tls.msk.ru
Wed Jun 1 04:15:41 MDT 2011


01.06.2011 14:06, samba-bugs at samba.org пишет:
> https://bugzilla.samba.org/show_bug.cgi?id=8198
> 
>            Summary: rsync does not set TZ variable after chroot(), which
>                     confuses logging timestamps
>            Product: rsync
>            Version: 3.1.0
>           Platform: All
>         OS/Version: All
>             Status: NEW
>           Severity: normal
>           Priority: P5
>          Component: core
>         AssignedTo: wayned at samba.org
>         ReportedBy: jkaluza at redhat.com
>          QAContact: rsync-qa at samba.org
> 
> 
> Hi,
> after chroot(), "current" timezone is changed in chrooted process which leads
> to the following output in logs:

> Attached patch fixes this issue by caching current timezone and setting TZ
> variable after chroot() call.

tzset() call before chroot should be enough for that --
that's what has always been done in chroot programs
exactly for this purpose (tzset was broken in glibc
at least once, but that's details).

/mjt



More information about the rsync mailing list