Re: [syslog-ng]replacing Linux klogd by a chrooted syslog-ng running as a non root user
Balazs Scheidler wrote :
On Thu, Nov 07, 2002 at 03:10:50PM +0100, Guillaume LACHENAL wrote:
Is it for the same reasons that I have (almost) every time to send SIGTERM *twice* for syslog-ng to terminate ?
it was a bug, and should have been fixed in latest 1.5.x release.
OK. I'll upgrade when the best of syslog-ng will be configured quite fine on the box ;-)
then instead of using syslog-ng's own chroot feature, use the chroot
Are you sure a chrooted process can follow symlinks outside the jail ?
it's not the chrooted process which accesses the symlink, the programs running outside are accessing a file _in_ the chroot. (symlink in /dev/log pointing to /chroot/dev/log)
Could you please explain. It works as you say with ntpd chrooted on my box. But, after 'chroot /chroot /sbin/ntpd' the running ntpd only see what's under '/chroot/'. How it works when ntpd attempt to log something ? (to /chroot/dev/log)
I remember, libc itself shouldn't be needed. ldd shows what syslog-ng is linked to, but if it started outside, it will link to /lib/libc.so.6, and _then_ chroot itself -> no need for libc in the jail itself.
the others libresolv etc. are loaded after the chroot() call, so they must be present in the jail as well.
try rm-ing the libc inside the jail (and only libc the others might be needed), and start syslog-ng, it _should_ work.
Yes, it works
On Thu, Nov 07, 2002 at 04:31:45PM +0100, Guillaume LACHENAL wrote:
Balazs Scheidler wrote :
Could you please explain. It works as you say with ntpd chrooted on my box. But, after 'chroot /chroot /sbin/ntpd' the running ntpd only see what's under '/chroot/'. How it works when ntpd attempt to log something ? (to /chroot/dev/log)
here's the scenario: - syslog-ng chrooted, using /dev/log _inside_ the jail - applications outside cannot send log messages, as their /dev/log is not opened (as syslog-ng only opened /dev/log _in_ the jail) - symlink in the outside system from /dev/log to /chroot/syslog-ng/dev/log any program not within any jail can happily send log messages, and you can reload syslog-ng. it might not be completely applicable to your case, but might be useful if somebody wants to run syslog-ng in a jail, and still be able to send log messages from the system. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (2)
-
Balazs Scheidler
-
Guillaume LACHENAL