[H-GEN] /dev/log inside a chroot
James McPherson - Solution Centre Engineer
James.McPherson at aus.sun.com
Tue Aug 22 22:45:26 EDT 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
David Jericho wrote:
>
> A lot of applications obviously write to /dev/log as opposed to using udp
> based syslog logging. But inside a chroot, the new /dev/log isn't the
> same as the old /dev/log that syslog has opened.
>
> How do I go about fixing this? That is, getting the chrooted version of
> /dev/log to work?
I'm not up to date wrt linux atm, but under solaris 2.6 and above you have to
write your own syslog routines because syslog logging under chrooted environment
is not supported. This is due to the door file /etc/.syslog_door not being
linkable (ln -s) to another fs. The three functions which you need to dummy up
(and compile to .so then use LD_PRELOAD) are
void openlog(const char *ident, int logopt, int facility);
void syslog(int priority, const char *message, ... /* arguments */);
void closelog(void);
how close to SysV is linux these days when it comes to syslog?
cheers,
James
--
Solution Centre Engineer 828 Pacific Highway
Sun Microsystems Australia Pty Ltd Gordon NSW 2072
Support Helpline: 1-800-555-786
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list