NetBSD Problem Report #41273

From www@NetBSD.org  Fri Apr 24 08:09:42 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id BFB4963BC38
	for <gnats-bugs@gnats.netbsd.org>; Fri, 24 Apr 2009 08:09:41 +0000 (UTC)
Message-Id: <20090424080941.8ABB863B8A5@www.NetBSD.org>
Date: Fri, 24 Apr 2009 08:09:41 +0000 (UTC)
From: gremlin@portal-to-web.de
Reply-To: gremlin@portal-to-web.de
To: gnats-bugs@NetBSD.org
Subject: missing '/' in /etc/rc.d/named in section named_migrate
X-Send-Pr-Version: www-1.0

>Number:         41273
>Category:       bin
>Synopsis:       missing '/' in /etc/rc.d/named in section named_migrate
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 24 08:10:00 +0000 2009
>Closed-Date:    Sun Nov 15 06:07:40 +0000 2009
>Last-Modified:  Sun Nov 15 06:10:03 +0000 2009
>Originator:     Martin Mersberger
>Release:        5.0_RC4/amd64
>Organization:
>Environment:
NetBSD 5.0_RC4 (XEN3_DOMU) #0: Wed Apr 15 00:23:26 UTC 2009  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-0-RC4/amd64/200904142015Z-obj/home/builds/ab/netbsd-5-0-RC4/src/sys/arch/amd64/compile/XEN3_DOMU
>Description:
Hi Folks,

I've just chrooted my named on a fresh install of RC4. After the named_migrate() has finished, the directory structure in the chroot was pretty much damaged. The reason seem to be, that the named_migrate does not handle sub directories in /etc/namedb correctly. (Line 34: d=$dst$(dirname $f)  makes a
/etc/namedb/XXX to /var/chroot/named/etc/namedbXXX
.. so a '/' is missing there'.

I'd recommend to write line 34 in /etc/rc.d/named as 
 d=$dst/$(dirname $f)

)

Btw - /etc/security complains now about /etc/namedb as it's now a link. Wouldn't it make sense to default to a chroot environment in /etc/defaults/rc.conf for named and define /etc/namedb as a link in /etc/security ?!


Thanks for your help!

regards
 Martin 


>How-To-Repeat:

create a directory structure in /etc/namedb (mkdir -p /etc/namedb/XX/YY)
remove an existing chroot structure and restart /etc/rc.d/named to trigger named_migrate()

Check the hierarchy in $CHROOT/etc/namedb
>Fix:
I'd recommend to write line 34 in /etc/rc.d/named as 
 d=$dst/$(dirname $f)

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-sourcechanges@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/41273: missing '/' in /etc/rc.d/named in section
	named_migrate
Date: Sat, 14 Nov 2009 21:56:51 +0000

 This didn't make it to gnats because of a since-fixed bug in the
 source-changes monitoring script.

    ------

 From: Christos Zoulas <christos@netbsd.org>
 To: source-changes@NetBSD.org
 Subject: CVS commit: src/etc/rc.d
 Date: Fri, 24 Apr 2009 10:26:02 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Fri Apr 24 14:26:02 UTC 2009

 Modified Files:
 	src/etc/rc.d: named

 Log Message:
 PR/41273: Martin Mersberger: missing '/' in /etc/rc.d/named in section
 named_migrate


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/etc/rc.d/named

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 14 Nov 2009 22:25:14 +0000
State-Changed-Why:
pullup-5 #1146


State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sun, 15 Nov 2009 06:07:40 +0000
State-Changed-Why:
Pulled up.


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41273 CVS commit: [netbsd-5] src/etc/rc.d
Date: Sun, 15 Nov 2009 06:05:52 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sun Nov 15 06:05:52 UTC 2009

 Modified Files:
 	src/etc/rc.d [netbsd-5]: named

 Log Message:
 Pull up following revision(s) (requested by dholland in ticket #1146):
 	etc/rc.d/named: revision 1.20
 PR/41273: Martin Mersberger: missing '/' in /etc/rc.d/named in section
 named_migrate


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.18.28.1 src/etc/rc.d/named

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.