Forwarding from misc@ as some people said that '1.' below is a kind of bug. Ie. syslogd deletes any existing file if the file is value for -p.
----- Forwarded message from Jiri B <ji...@devio.us> ----- Date: Thu, 8 Feb 2018 07:29:32 -0500 From: Jiri B <ji...@devio.us> To: m...@openbsd.org Subject: syslogd loghost only - without unix socket & /dev/klog User-Agent: Mutt/1.5.23 (2014-03-12) Hi, I was speculating about another instance of syslogd, just as a log host services while having base syslogd running on same box. 1. -p /dev/null deletes /dev/null and replaces it with socket file with same name crw-rw-rw- 1 root wheel 2, 2 Feb 8 13:25 /dev/null # syslogd -d -F -f /etc/syslog_test.conf -p /dev/null -T 127.0.0.1:5140 -U 127.0.0.1:5140 -Z -n -u -r syslogd[54737]: open /dev/klog: Device busy CAfile /etc/ssl/cert.pem off & running.... init syslogd[54737]: fatal in syslogd: open /dev/null: Operation not supported syslogd[54737]: dropped 1 message during initialization syslogd: exited srw-rw-rw- 1 root wheel 0 Feb 8 13:26 /dev/null 2. -p '' returns: syslogd[50469]: bind unix "": No such file or directory syslogd[50469]: log socket failed ... 3. another syslogd instance tries to open still /dev/klog syslogd[50469]: open /dev/klog: Device busy Could we make syslogd not to open /dev/klog and disable any unix socket listening? Thank you for consideration. Tested on: kern.version=OpenBSD 6.2-current (GENERIC.MP) #399: Fri Feb 2 18:28:58 MST 2018 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP Repro steps: * -p /dev/null * -p '' * echo '*.* /tmp/messages' > /tmp/syslog.conf touch /tmp/messages syslogd -d -F -f /tmp/syslog.conf -T 127.0.0.1:5140 -U 127.0.0.1:5140 -Z -n -u -r Jiri ----- End forwarded message -----