Re: Using syslog(3) after chroot-ing
On Thu, 1 Jul 2004 08:50:42 +0900 horio shoichi <[EMAIL PROTECTED]> wrote: > On Wed, 30 Jun 2004 15:06:39 -0400 > Charles Swiger <[EMAIL PROTECTED]> 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 > > > > ___ > > [EMAIL PROTECTED] mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > 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 > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Using syslog(3) after chroot-ing
On Wed, 30 Jun 2004 15:06:39 -0400 Charles Swiger <[EMAIL PROTECTED]> 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 > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Using syslog(3) after chroot-ing
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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Using syslog(3) after chroot-ing
On Jun 29, 2004, at 6:22 PM, Mikhail Teterin wrote: Is there a similar trick to make it use the local timezone instead of UTC? I'm surprised, the time is interpreted by the sender (rather than by the syslogd-recipient), but it is -- and I want it to be local, without copying /etc/localtime into the chroot tree. What happens if you set TZ in the environment which syslogd is started up from? -- -Chuck ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"