Subject: Re: localtime and chroot issues
To: None <tech-kern@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 05/06/2004 15:09:54
=F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 6 =ED=C1=CA 2004 14:48 Simon J. Gerr=
aty =CE=C1=D0=C9=D3=C1=CC(a):

> >that tftpd daemon runs as chroot-ed process in default /tftproot dir so =
of
> >course it couldn't access /etc/localtime to get the proper timezone
> >information. Ok, i made a copy of localtime in tftpd's sandbox so it fee=
ls
> >happy now.
>
> A good solution is to modify syslog(3) to just send bare utc seconds
> (suitably tagged) and have syslogd do the conversion to localtime.
>
> This involves a change to the protocol b/w syslog and syslogd,
> but provided you also handle the old format - and use that when
> sending off box it shouldn't do any harm.  Then you only have
> one process that you need to have call tzset when you HUP it for
> instance - to ensure that localtime changes are picked up globally.

Yes, IMHO this is fine idea. Probably I'll try to make it for tests=20
[unfortunately, when i have time :)].

But basically, i meant more deep changes in syslog protocol when timestamp=
=20
information is attached on server side upon syslog entry is received by the=
=20
daemon. This way client isn't involved in timestamp generation at all and a=
s=20
a result cannot fabricate it. Even if we consider to send timestamp info in=
=20
UTC format, client still can send invalid information due to software bug o=
r=20
doing it explicitly.

// wbr