Re: [syslog-ng]logging from a chrooted process
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
On Thu, Nov 07, 2002 at 04:14:45PM +0100, Guillaume LACHENAL wrote:
Balazs Scheidler wrote: 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"); };
I wouldn't like to implement this feature. You could write a script with the same functionality instead that would generate you syslog-ng.conf. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Msg from Guillaume LACHENAL: Hey Guillaume,
what about a unix-stream("/var/chroot/ntp/dev/log") source to syslog-ng?
... symlinked to /dev/log
A symlink to /dev/log in a chroot refers to CHROOT/dev/log, which is the same in your case if I understand the above correctly. If that would work the way you intended, that would defeat the purpose of a chroot :) Different story with hardlinks, which in turn wont work with sockets. Greetings, Gregor.
participants (3)
-
Balazs Scheidler
-
Gregor Binder
-
Guillaume LACHENAL