Date: Tue, 20 Jan 2004 21:35:35 +0100 (CET) From: Melvyn Sopacua <melvyn@webteckies.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/61647: [PATCH] Compatibility with bind9-base port Message-ID: <20040120203535.E93A3B828@sarevok.webteckies.org> Resent-Message-ID: <200401202040.i0KKe9CI057025@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 61647 >Category: conf >Synopsis: [PATCH] Compatibility with bind9-base port >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 20 12:40:09 PST 2004 >Closed-Date: >Last-Modified: >Originator: Melvyn Sopacua >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Tue Dec 30 14:31:47 CET 2003 root@sarevok.idg.nl:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386 >Description: Bind9 changed the meaning of the -g argument. In etc/rc.d/named this argument is however incorporated in the rc_flags at all times, making the bind9base port failing to start. >How-To-Repeat: Install bind9-base port and put named_enable=YES in /etc/rc.conf >Fix: Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.195 diff -u -r1.195 rc.conf --- etc/defaults/rc.conf 25 Dec 2003 23:29:19 -0000 1.195 +++ etc/defaults/rc.conf 20 Jan 2004 20:30:42 -0000 @@ -155,6 +155,9 @@ # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink ${named_pidfile} and /var/run/ndc # to their chrooted counterparts. +named_setgroup="YES" # Set the group for named. Set to NO if running + # the bind9-base port, because bind9 changed + # the meaning of the -g argument. # # kerberos. Do not run the admin daemons on slave servers Index: etc/rc.d/named =================================================================== RCS file: /home/ncvs/src/etc/rc.d/named,v retrieving revision 1.8 diff -u -r1.8 named --- etc/rc.d/named 17 Jan 2004 10:59:43 -0000 1.8 +++ etc/rc.d/named 20 Jan 2004 20:30:42 -0000 @@ -72,7 +72,14 @@ ! checkyesno named_rcng && return 0 # Is the user using a sandbox? if [ -z "$named_chrootdir" ]; then - rc_flags="-u $nuser -g $ngroup $rc_flags" + case "$named_setgroup" in + [Yy][Ee][Ss]) + rc_flags="-u $nuser -g $ngroup $rc_flags" + ;; + *) + rc_flags="-u $nuser -t ${named_chrootdir} $rc_flags" + ;; + esac return 0 fi @@ -85,7 +92,14 @@ # Change run_rc_commands()'s internal copy of $named_flags # ! checkyesno named_rcng && return - rc_flags="-u $nuser -g $ngroup -t ${named_chrootdir} $rc_flags" + case "$named_setgroup" in + [Yy][Ee][Ss]) + rc_flags="-u $nuser -g $ngroup -t ${named_chrootdir} $rc_flags" + ;; + *) + rc_flags="-u $nuser -t ${named_chrootdir} $rc_flags" + ;; + esac } load_rc_config $name >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040120203535.E93A3B828>