syslogd loghost only - without unix socket & /dev/klog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

syslogd loghost only - without unix socket & /dev/klog

Jiri B-2
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
    [hidden email]:/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