NetBSD Problem Report #52840

From dieter.r@pandora.be  Mon Dec 18 18:22:56 2017
Return-Path: <dieter.r@pandora.be>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EA9F37A182
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 18 Dec 2017 18:22:56 +0000 (UTC)
Message-Id: <20171218182252.4FE0E2A50BD@simult.auwegem.be>
Date: Mon, 18 Dec 2017 19:22:05 +0100 (CET)
From: dieter.NetBSD@pandora.be
Reply-To: dieter.NetBSD@pandora.be
To: gnats-bugs@NetBSD.org
Subject: syslogd doesn't start when unbound is enabled
X-Send-Pr-Version: 3.95

>Number:         52840
>Category:       misc
>Synopsis:       syslogd doesn't start when unbound is enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 18 18:25:00 +0000 2017
>Last-Modified:  Mon Dec 24 21:15:01 +0000 2018
>Originator:     dieter roelants
>Release:        NetBSD 8.99.3
>Organization:
>Environment:
System: NetBSD simult.auwegem.be 8.99.3 NetBSD 8.99.3 (SIMULT) #150: Mon Dec 18 18:03:16 CET 2017 dieter@simult.auwegem.be:/build/obj.amd64.current/sys/arch/amd64/compile/SIMULT amd64
Architecture: x86_64
Machine: amd64
>Description:
	Putting unbound=YES in rc.conf makes it run (chrooted by
	default), but makes syslogd not start on next boot. The
	reason for that is that it thinks it should create a socket
	for unbound in /var/chroot/unbound/var/run/, which does
	not exist. It appears unbound opens /var/run/log before
	chrooting, so the socket in its chroot and the directory
	are not actually needed.
>How-To-Repeat:
	echo unbound=YES >>/etc/rc.conf
	/etc/rc.d/syslogd restart
>Fix:
	The following is a possible fix.

--- /build/src/etc/rc.d/syslogd	2004-10-11 15:29:52.000000000 +0200
+++ /etc/rc.d/syslogd	2017-12-18 19:04:15.116517030 +0100
@@ -39,8 +39,9 @@
 	    (
 		_l=${_lr##*/}
 		load_rc_config ${_l}
+		checkyesno $_l || continue
 		eval _ldir=\$${_l}_chrootdir
-		if checkyesno $_l && [ -n "$_ldir" ]; then
+		if [ -n "$_ldir" ] && [ -d "$_ldir/var/run" ]; then
 			echo "${_ldir}/var/run/log" >> $_sockfile
 		fi
 	    )

>Audit-Trail:
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/52840 (syslogd doesn't start when unbound is enabled)
Date: Sun, 24 Jun 2018 10:34:52 +1200

 This bug affects 8.0_RC1 (2018-06-18) as well.

 In my case, I was upgrading from 7.0 with unbound from pkgsrc. Even =
 after switching to the 8.0 unbound and moving my unbound.conf into =
 /etc/unbound, I found that unbound started fine, but syslog still =
 wouldn=E2=80=99t start.

 Cheers,
 Lloyd

From: reed@reedmedia.net
To: gnats-bugs@netBSD.org
Cc: 
Subject: Re: misc/52840
Date: Mon, 24 Dec 2018 15:14:02 -0600 (CST)

 I noticed my logging wasn't working when I got a cron mail that said:

 newsyslog: /var/run/syslogd.pid: No such file or directory

 My fix was:
 mkdir -p /var/chroot/unbound/var/run
 then I could start it.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.