[syslog-ng]logging from a chrooted process

Guillaume LACHENAL glachenal@on-x.com
Thu, 7 Nov 2002 16:14:45 +0100


Balazs Scheidler wrote:

> On Thu, Nov 07, 2002 at 02:30:19PM +0100, Guillaume LACHENAL wrote:
> > I'm currently trying to chroot some services on a Linux box (ntpd)
> > 
> > strace'ing it to find the missing libs, I've seen that the process 
can't 
> > log as /dev/log is outside the jail
> > 
> > > 9135  connect(4, {sin_family=AF_UNIX, path="      /dev/log"}, 16) = 
-1 
> > ENOENT (No such file or directory)
> > 
> > How to make a /dev/log into the jail ? or send the log via network to 
a 
> > log collector ?
> 
> what about a unix-stream("/var/chroot/ntp/dev/log") source to syslog-ng?

... symlinked to /dev/log

Yes, you indirectly reply me in
https://lists.balabit.hu/pipermail/syslog-ng/2002-November/004096.html

B> configuration initialization is performed prior to chroot-ing, so 
syslog-ng
B> first opens the necessary devices, and then chroots itself.

Instead of adjusting my conf file each time a chroot a service (OK, it's 
not
every day ;-), it would be perfect if I can write a thing like :

        source s_chroot { unix-stream("/chroot/*/dev/log"); };

regards,
Guillaume