Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2004 12:16:47 +0900
From:      horio shoichi <bugsgrief@bugsgrief.net>
To:        horio shoichi <bugsgrief@bugsgrief.net>
Cc:        questions@FreeBSD.org
Subject:   Re: Using syslog(3) after chroot-ing
Message-ID:  <20040701.031647.a2a4b4f6c4264fee.10.0.3.20@bugsgrief.net>
In-Reply-To: <20040630.235042.21cf5e36a186d85a.10.0.3.20@bugsgrief.net>
References:  <200406291822.25914@misha-mx.virtual-estates.net> <E2B31D2B-CABA-11D8-9B33-003065ABFD92@mac.com> <200406301500.18611@misha-mx.virtual-estates.net> <9D6E84AE-CAC8-11D8-9B33-003065ABFD92@mac.com> <20040630.235042.21cf5e36a186d85a.10.0.3.20@bugsgrief.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 1 Jul 2004 08:50:42 +0900
horio shoichi <bugsgrief@bugsgrief.net> wrote:
> On Wed, 30 Jun 2004 15:06:39 -0400
> Charles Swiger <cswiger@mac.com> wrote:
> > On Jun 30, 2004, at 3:00 PM, Mikhail Teterin wrote:
> > > =What happens if you set TZ in the environment which syslogd is started
> > > =up from?
> > >
> > > That's an idea. Can I just call tzset() (or tzsetwall()?) prior to
> > > chroot-ing?
> > 
> > I suspect that you could indeed.  Again, just to be clear: the 
> > timestamps are produced by syslogd, not by the program doing the 
> > logging, so you'd have to change syslogd itself.
> > 
> > -- 
> > -Chuck
> > 
> > _______________________________________________
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> > 
> 
> The tzset() alone doesn't fill the gap.
> 
> You need fill /chrootedplace/etc/localtime with valid local time information.
> 
> For syslogd to catch logs, the socket must be captured by it:
> /chrootedplace/{dev/log,var/run/log}, depending on your preference.
> 
> 
> 
> horio shoichi
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 

My keyboard seems too slippery today. Please read the whole of my message
as: syslog expresses local time through ctime_r() which means tzset() will
be done via /etc/localtime. So, it's sufficient to set /etc/localtime in
the chrooted environment.

(The second paragraph is completely redundant; it's only needed to bring
the syslog messages out of chrooted environment. Sorry.)


horio shoichi




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040701.031647.a2a4b4f6c4264fee.10.0.3.20>