This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
syslog socket
- From: Chuck Wolber <chuckw at quantumlinux dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 1 Nov 2006 20:53:13 -0800 (PST)
- Subject: syslog socket
Greetings,
For x86 embedded systems development, we have a need to lock down the root
level filesystem in a read-only fashion. In order to have syslog work
properly, we need to use the "-p /new/path/to/socket" flag. The problem
with this is that any other program that calls openlog() (such as
/usr/bin/logger) gets handed a pointer to a nonexistant /dev/log socket.
Unless I am mistaken, this is because openlog() (which lives in
misc/syslog.c) references _PATH_LOG at libc compmile time.
A quick and dirty solution is to symlink /dev/log to the new socket
location. There are some corner cases in our OS model that have the root
filesystem read/write at odd times, which leaves us open to the
possibility that a syslogd shutdown will delete the /dev/log symlink and
leave us without the ability to log messages. In addition, logging to a
network socket is not feasable for us.
Is it worth considering patching misc/syslog.c so that openlog() uses an
alternate socket location as defined in syslog.h? In other words, I feel
that if I change _PATH_LOG in syslog.h and recompile apps, they should "do
the right thing". I shouldn't have to recompile glibc in order to
gracefully repoint everything to a different syslog socket.
Thank you,
..Chuck..
--
http://www.quantumlinux.com
Quantum Linux Laboratories, LLC.
ACCELERATING Business with Open Technology
"The measure of the restoration lies in the extent to which we apply
social values more noble than mere monetary profit." - FDR