DragonFly commits List (threaded) for 2009-04
DragonFly-220.127.116.112.gcc753 master lib/libc/gen syslog.c sys/sys syslog.h usr.sbin/syslogd Makefile syslog.conf.5 syslogd.8 syslogd.c
Author: Peter Avalos <email@example.com>
Date: Sun Mar 15 00:28:51 2009 -1000
Sync syslogd with FreBSD:
* Add a flag, -T, that tells syslogd to always replace the timestamp on
messages from the network. This option lets us replace timestamps that
are correctly formatted but wrong.
* Allow comment to be placed at the end of a configuration line.
* Add a -8 switch to syslogd to prevent it from mangling 8-bit data.
* Open ctty in non-blocking mode to avoid hangs during open and close.
* Handle "*" as a priority properly.
* Dynamically determine length vs. hardcoding it.
* Free the previous message buffer (f_prevline) only after logging all
the messages and just before the process exit. Also check f_prevline for
NULL before using it.
* Add the ability to log to an arbitrary udp port as well as the
standard syslog port.
* Currently, if writing out a log entry fails, we unlink that log entry
from our internal list of logfiles. So if writev(2) fails for potentially
transient errors like ENOSPC, syslogd requires a restart, even if the
filesystem has purged. This change allows syslogd to ignore ENOSPC
space errors, so that when the filesystem is cleaned up, syslogd will
automatically start logging again without requiring the reset.
This makes syslogd(8) a bit more reliable.
* Add -C option which tells syslogd(8) to create log files if they don't
* Add cases for ENOBUFS and ENETDOWN. We need to make sure that we
catch all transient errors. This fixes situations where transient
error conditions such as network interfaces losing carrier signals
or the system running out of mbufs would result in the permanent
removal of forwarding syslog messages.
* Add -S option which allows to change the pathname of the privileged
* Check that supplied facility is not bigger than LOG_NFACILITIES.
* Allow ':' and '%' in hostname specifications so that we can specify
IPv6 addresses and scope IDs.
* Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).
- Make syslogd open an additional socket /var/run/logpriv, with 0600
- In libc, try to use this socket.
- Do not loop forever if we are using this socket
* Use stailqueue for sockets instead of socket buffer. Thus remove
limit for 20 sockets.
* Add possibility to specify file mode for sockets created with '-l'.
* Check that socket name in '-l' is absolute.
* Make syslog(3) thread safe.
Summary of changes:
lib/libc/gen/syslog.c | 177 +++++++++++----
sys/sys/syslog.h | 30 +--
usr.sbin/syslogd/Makefile | 12 +-
usr.sbin/syslogd/syslog.conf.5 | 54 +++--
usr.sbin/syslogd/syslogd.8 | 75 +++++--
usr.sbin/syslogd/syslogd.c | 477 +++++++++++++++++++++++++---------------
6 files changed, 554 insertions(+), 271 deletions(-)
DragonFly BSD source repository