This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]