From olivleh1@kartoffel.salatschuessel.net  Sun Nov 14 10:29:08 2004
Return-Path: <olivleh1@kartoffel.salatschuessel.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 0507716A4CE; Sun, 14 Nov 2004 10:29:08 +0000 (GMT)
Received: from kartoffel.salatschuessel.net (pD95207C1.dip.t-dialin.net [217.82.7.193])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 0A21443D1F; Sun, 14 Nov 2004 10:29:07 +0000 (GMT)
	(envelope-from olivleh1@kartoffel.salatschuessel.net)
Received: from kartoffel.salatschuessel.net (localhost [127.0.0.1])
	by kartoffel.salatschuessel.net (8.12.11/8.12.11) with ESMTP id iAEAUHhO060985;
	Sun, 14 Nov 2004 11:30:17 +0100 (CET)
	(envelope-from olivleh1@kartoffel.salatschuessel.net)
Received: (from olivleh1@localhost)
	by kartoffel.salatschuessel.net (8.12.11/8.12.11/Submit) id iAEAUHp3060984;
	Sun, 14 Nov 2004 11:30:17 +0100 (CET)
	(envelope-from olivleh1)
Message-Id: <200411141030.iAEAUHp3060984@kartoffel.salatschuessel.net>
Date: Sun, 14 Nov 2004 11:30:17 +0100 (CET)
From: Oliver Lehmann <oliver@freebsd.org>
Reply-To: Oliver Lehmann <oliver@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Lehmann <oliver@freebsd.org>
Subject: /etc/rc.d/named will not work with ports-named
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         73929
>Category:       conf
>Synopsis:       [patch] /etc/rc.d/named will not work with ports-named
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 14 10:30:27 GMT 2004
>Closed-Date:    Sun Oct 28 00:33:47 UTC 2007
>Last-Modified:  Sun Oct 28 00:33:47 UTC 2007
>Originator:     Oliver Lehmann
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD kartoffel.salatschuessel.net 4.10-STABLE FreeBSD 4.10-STABLE #0: Fri Jun 4 20:32:48 CEST 2004 olivleh1@kartoffel.salatschuessel.net:/usr/obj/usr/src/sys/KARTOFFEL i386


	FreeBSD avocado.salatschuessel.net 5.3-STABLE FreeBSD 5.3-STABLE #1: Sat Nov 13 15:16:49 CET 2004     olivleh1@avocado.salatschuessel.net:/usr/obj/usr/src/sys/AVOCADO  i386

>Description:
	/etc/rc.d/named tries to run rndc-confgen if "${named_chrootdir}/etc/namedb/rndc.key" and "${named_chrootdir}/etc/namedb/rndc.conf"
	is nonexistent.
	a) rndc-confgen installed from dns/bind93 only generates /usr/local/etc/rndc.key and
	   ${confgen_chroot}/usr/local/etc/rndc.key so rndc-confgen will be run everytime
	   /etc/rc.d/named is called.
	b) /usr/local/sbin isn't in PATH at bootup - calling "rndc-confgen" at bootup will
	   fail. That will cause named to not startup.

>How-To-Repeat:
	remove base-bind, install bind from ports, run /etc/rc.d/named and/or reboot
>Fix:

        PREFIX=${named_program%%/sbin/named}

	if [ "${PREFIX}"  = "/usr" -a ! -f "${named_chrootdir}/etc/namedb/rndc.key" -a ! -f "${named_chrootdir}/etc/namedb/rndc.conf" ] || \
	   [ "${PREFIX}" != "/usr" -a ! -f "${named_chrootdir}/${PREFIX}/etc/rndc.key" ] ; then
		${PREFIX}/sbin/rndc-confgen -a -b256 ${confgen_chroot}
	fi

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Mon Dec 5 09:18:33 GMT 2005 
Responsible-Changed-Why:  

I handle this script 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73929 
State-Changed-From-To: open->patched 
State-Changed-By: dougb 
State-Changed-When: Mon Oct 22 09:49:50 UTC 2007 
State-Changed-Why:  

I just committed version 1.27 of rc.d/named which has a 
fix for this issue. Please try it and let me know if it 
works for you. 

Doug 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73929 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/73929: commit references a PR
Date: Mon, 22 Oct 2007 14:26:00 +0000 (UTC)

 dougb       2007-10-22 09:38:44 UTC
 
   FreeBSD src repository
 
   Modified files:
     etc/rc.d             named 
   Log:
   1. Determine the location of the rndc* binaries relative to $command
   so that when using named from the ports (or elsewhere) the proper rndc*
   commands will be run.
   
   2. Rework the stop routine using ideas from brooks and delphij.
   Specifically I am duplicating a lot of code from rc.subr's stop routine
   so that this one will behave more like the one in rc.subr, but use rndc
   to kill the daemon (or regular kill if that fails). This also avoids
   the problems related to using killall if rndc fails, which is bad if
   you're running more than one named on the same box.
   
   3. Take a concept from gshapiro and allow the rndc.key file to be
   owned by root OR the named_uid user.
   
   Although I used different solutions, this commit handles issues raised in:
   PR:     conf/73929
   PR:     conf/103976
   PR:     conf/109409
   
   Revision  Changes    Path
   1.27      +22 -14    src/etc/rc.d/named
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: dougb 
State-Changed-When: Sun Oct 28 00:33:10 UTC 2007 
State-Changed-Why:  

The patch has now been MFC'ed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73929 
>Unformatted:
