NetBSD Problem Report #50191
From www@NetBSD.org Wed Sep 2 07:51:27 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6D8A8A6531
for <gnats-bugs@gnats.NetBSD.org>; Wed, 2 Sep 2015 07:51:27 +0000 (UTC)
Message-Id: <20150902075126.1E198A65B7@mollari.NetBSD.org>
Date: Wed, 2 Sep 2015 07:51:26 +0000 (UTC)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@NetBSD.org
Subject: /etc/rc.d/ntpd should also copy resolv.conf to chroot dir
X-Send-Pr-Version: www-1.0
>Number: 50191
>Category: bin
>Synopsis: /etc/rc.d/ntpd should also copy resolv.conf to chroot dir
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 02 07:55:00 +0000 2015
>Closed-Date: Wed Apr 24 12:05:16 +0000 2019
>Last-Modified: Wed Apr 24 12:05:16 +0000 2019
>Originator: Takahiro Kambe
>Release: NetBSD 6.1_STABLE
>Organization:
K. I. S. U. Inc.
>Environment:
NetBSD nora.i.kisu.co.jp 6.1_STABLE NetBSD 6.1_STABLE (VMWARE-F7) #13: Tue Jul 14 17:24:53 JST 2015 sisbic-info@kisu.co.jp:/data/NetBSD-6/amd64.obj/sys/arch/amd64/compile/VMWARE-F7 amd64
Architecture: x86_64
Machine: amd64
>Description:
/etc/rc.d/ntpd should also copy resolv.conf to chroot directory.
>How-To-Repeat:
1. Run host without locally running DNS name server but specify
name server(s) on other hosts in /etc/resolv.conf.
2. Prepare ntpd to start; configure /etc/ntp.conf properly
refering NTP server using *hostname*.
3. In /etc/rc.conf, add these lines:
ntpd=YES
ntpd_chrootdir="/var/chroot/ntpd"
4. Start ntpd:
# sh /etc/rc.d/ntpd start
Then, ntpd process dose not solve hostnames in ntp.conf trying to
resolve with local name server (which dose not exist).
>Fix:
Copy /etc/resolv.conf as /etc/services in /etc/rc.d/ntpd.
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/50191: /etc/rc.d/ntpd should also copy resolv.conf to chroot
dir
Date: Sun, 6 Sep 2015 00:07:32 +0000
On Wed, Sep 02, 2015 at 07:55:00AM +0000, taca@back-street.net wrote:
> >Description:
> /etc/rc.d/ntpd should also copy resolv.conf to chroot directory.
> >How-To-Repeat:
> 1. Run host without locally running DNS name server but specify
> name server(s) on other hosts in /etc/resolv.conf.
> 2. Prepare ntpd to start; configure /etc/ntp.conf properly
> refering NTP server using *hostname*.
> 3. In /etc/rc.conf, add these lines:
>
> ntpd=YES
> ntpd_chrootdir="/var/chroot/ntpd"
>
> 4. Start ntpd:
>
> # sh /etc/rc.d/ntpd start
>
> Then, ntpd process dose not solve hostnames in ntp.conf trying to
> resolve with local name server (which dose not exist).
> >Fix:
> Copy /etc/resolv.conf as /etc/services in /etc/rc.d/ntpd.
What happens if /etc/resolv.conf is being manipulated by dhcp?
(Maybe we just don't care about that case...)
--
David A. Holland
dholland@netbsd.org
From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org, dholland-bugs@netbsd.org
Cc:
Subject: Re: bin/50191: /etc/rc.d/ntpd should also copy resolv.conf to
chroot dir
Date: Sun, 06 Sep 2015 14:26:09 +0900 (JST)
In message <20150906001007.1BCFAA65BC@mollari.NetBSD.org>
on Sun, 6 Sep 2015 00:10:07 +0000 (UTC),
David Holland <dholland-bugs@netbsd.org> wrote:
> > >Fix:
> > Copy /etc/resolv.conf as /etc/services in /etc/rc.d/ntpd.
>
> What happens if /etc/resolv.conf is being manipulated by dhcp?
It become problem,
* Connecting network was changed and name servers' IP address changed, too.
* With some reason, reconfigure NTP server without restarting ntpd.
In other cases, ntpd will start after getting IP address via DHCP, so
it would not problem.
> (Maybe we just don't care about that case...)
Sure.
--
Takahiro Kambe <taca@back-street.net>
From: Roy Marples <roy@marples.name>
To: gnats-bugs@NetBSD.org, dholland-bugs@netbsd.org,
Takahiro Kambe <taca@back-street.net>
Cc:
Subject: Re: bin/50191: /etc/rc.d/ntpd should also copy resolv.conf to chroot
dir
Date: Thu, 18 Aug 2016 15:56:16 +0100
libc will query the localhost resolver if resolv.conf is not present or
no nameserver is specified.
The correct solution is to run a resolver on the localhost.
Roy
From: Takahiro Kambe <taca@back-street.net>
To: roy@marples.name
Cc: gnats-bugs@NetBSD.org, dholland-bugs@netbsd.org
Subject: Re: bin/50191: /etc/rc.d/ntpd should also copy resolv.conf to
chroot dir
Date: Sat, 20 Aug 2016 14:19:41 +0900 (JST)
In message <0d94857b-f013-be2c-bea8-1a6c55976dfb@marples.name>
on Thu, 18 Aug 2016 15:56:16 +0100,
Roy Marples <roy@marples.name> wrote:
> libc will query the localhost resolver if resolv.conf is not present or
> no nameserver is specified.
I know it.
> The correct solution is to run a resolver on the localhost.
Your "resolver" is "caching server".
Prerequisite is the case of a simple client machine which dose not
(want to) run such a server.
--
Takahiro Kambe <taca@back-street.net>
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 24 Apr 2019 12:05:16 +0000
State-Changed-Why:
Duplicate 49380, which has a commit.
>Unformatted:
(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.