syslog from chrooted environment

Phil Pennock phil.pennock at globnix.org
Wed Jul 26 09:21:34 AEST 2017


On 2017-07-25 at 09:31 -0400, Mike Tancsa wrote:
> On 7/24/2017 8:39 PM, Nico Kadel-Garcia wrote:
> > Why are the targets of the hardlinks evaporating on rebooting? Is that
> > a FreeBSD'ism?
> 
> Its when syslogd stops/starts. The hardlinks need to be recreated for
> some reason.

Because /dev/log is a symlink to /var/run/log which is a Unix-domain
socket, created by whatever listens for connections.

You'll want to use syslogd_flags="..." in /etc/rc.conf to add a bunch of
<-l location> pairs.  Or create a new rc.d script to create the
hardlinks if you're wedded to that, and use the rcorder keywords to have
ssh depend upon it, etc.

Honestly, I'd start looking instead at having syslogd listen on a UDP
socket on a non-routed address and send to that locally instead.  See
the "-a" option to syslogd, although contrary to docs my past experience
has suggested that -a can't be repeated.

-Phil


More information about the openssh-unix-dev mailing list