master
Move parsing of incoming syslog messages to their own section. This should make it more manageable.
Move syslogd(8) TLS handshake callback from read to write handler.
If syslogd is started with -S, it accepts TLS connections to receive encrypted messages. The server certificates are taken from /etc/ssl like relayd does. OK benno@ beck@ deraadt@
When syslogd(8) failed to open a logfile, the error message could get lost. Remove log_setdebug() as it adds too much abstraction, use the global variable Started instead. Set the Started value before the init() function. Then errors during config file processing will be logged to the console as Initialize is still 0. This is better than stderr as the latter may be redirected to /dev/null. Print the timestamp and hostname also for direct messages to console, so that they look like all others. bug report jung@; OK benno@
including sys/cdefs.h manually started as a result of netbsd trying to macro-build a replacement for sccsid, and was done without any concern for namespace damage. Unfortunately this practice started infecting other code as others were unaware they didn't need the file. ok millert guenther
Retry DNS lookup for remote loghost.
During fd passing, receive_fd() tries to read the result value and the file descriptor. If the fd limit is exhausted, recvmsg(2) fails. The kernel discards the fd, but the result value stays in the socket. It has to be read on its own to keep the privsep parent and syslogd child in sync. OK benno@
Fix trailing whitespace and shorten long lines. No binary change.
document how program names are extracted from log lines in order to select syslog.conf(5) line blocks
OpenBSD syslogd(8) escapes binary data with vis(3). Use the VIS_NOSLASH option to avoid additional backslashes. Although this option prevents to decode binaries, it makes automatic post processing easier. Formats like JSON use backslash escaping themself, additional escaping from syslogd would break SIEM systems. vis protection was introduced to avoid evil characters in log files and not to make binary logging possible. from Matthias Pitzl; OK deraadt@
Fix memleak in syslogd(8) when client aborts TLS connection.
Use a define for the iov array size in syslogd. This is better than passing the magic number 6 around and checking at runtime whether its fits. OK deraadt@ martijn@ mvs@