Syslogd does not properly handle:
1) the ADDDATE flag which is set with -T invocation and when messages
come from the kernel. Other cases where it is set it is ignored
as timestamping is always done (e.g. logmsg_async())
2) the variable found_ts in check_timestamp(). It would determine
whether or not the message had a (possibly valid) timestamp, set
found_ts to true, then ignore that in most cases. If we can't find
a timestamp return.
3) messages without a parsable timestamp should get one when outputting
the BSD syslog format so that a syslog-protocol timestamp isn't
injected (chopped off with BSD syslog length) giving something like:
"2008-11-27T15:0 cisco -: 1790:"
^ time might have been 2008-11-27T15:02:35.296497+11:00
4) syslog protocol version checking only checked for a leading numeral
one (1) then skipped two places (presuming a space). Messages sent
from some sources (e.g. my cisco) may be
"1795: Nov 27 04:12:52: %LINEPROTO-5-..."
which would be chopped to
"95: Nov 27 04:12:52: %LINEPROTO-5-..."
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.
Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.
Fixes PR bin/35131, which was about talkd's memory leak.
messages received from the network. Useful for collecting logs from
devices which do not have correct time.
Add it to usage.
Document it, also document that syslogd adds a timestamp with the local
time if it does not recognize the original timestamp field. Bump date.
Approved by wrstuden@.
kqueue descriptor, because we set up events after we parse the file.
Unfortuntately, this means that we also have to do the chroot before
we read the config file. But this is OK -- the config file has to be
in the chroot environment anyway, because it has to be able to get to
it after SIGHUP.
Grrr, all because stupid kqueue descriptors are not inherited across
a fork. LAME.
include:
- Extend the syntax of syslog.conf to allow selections of log destinations
by comma-separated lists of program name (including kernel-generated
messages) and originating host name.
- Ability to pipe selected messages through arbitrary filter commands.
- Ability to specify priority comparison operations.
- Improvements to domain name handling.
- Conversion to use kqueue for communication and signal events, eliminating
all unsafe signal handlers.
- Allow spaces as well as tabs in syslog.conf.
- Log kernel printfs at LOG_NOTICE instad of LOG_CRIT.
- Ability to log facility/priority with a log message.
- Reliability improvements.
This avoids some seriously gratuitous disk hosage in various cases.
XXX It would probably be better to allow this to be specified in the config
file somehow.
the same string into "last message repeated N times", and instead forces
syslogd to write out every message.
Based on '-c' in FreeBSD's syslogd, although a different option letter was
chosen because their syslogd requires '-c -c' to get this functionality,
and we don't have the support for logging to pipes which is what FreeBSD's
syslogd with a single '-c' is related to.