Date: Tue, 26 Feb 2008 00:15:51 +0100 (CET) From: Stefan `Sec` Zehl <sec@42.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/121101: named_chroot_autoupdate forgets protocols & services Message-ID: <20080225231551.812E5B853@ice.42.org> Resent-Message-ID: <200802252320.m1PNK3vn090245@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 121101 >Category: bin >Synopsis: named_chroot_autoupdate forgets protocols & services >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 25 23:20:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: sec >Release: FreeBSD 7.0-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD ice 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #11: Thu Feb 21 00:53:58 CET 2008 root@ice:/usr/obj/usr/src/sys/ICE amd64 >Description: running named in chroot with named_chroot_autoupdate="YES" creates the chroot environment for named but forgets to copy /etc/protocols /etc/services >How-To-Repeat: run a chroot named with a zone including a WKS record test IN WKS 127.0.0.1 TCP ssh telnet finger saft http produces the following error Feb 25 23:34:26 ice named[82930]: dns_rdata_fromtext: master/42.org:285: near 'TCP': unknown protocol >Fix: --- /etc/rc.d/named.orig 2008-02-25 23:54:03.000000000 +0100 +++ /etc/rc.d/named 2008-02-25 23:56:32.000000000 +0100 @@ -64,12 +64,14 @@ devfs -m ${named_chrootdir}/dev rule apply path null unhide devfs -m ${named_chrootdir}/dev rule apply path random unhide - # Copy local timezone information if it is not up to date. + # Copy local information if it is not up to date. # - if [ -r /etc/localtime ]; then - cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || - cp -p /etc/localtime "${named_chrootdir}/etc/localtime" + for _f in localtime protocols services ; do + if [ -r /etc/$_f ]; then + cmp -s /etc/$_f "${named_chrootdir}/etc/$_f" || + cp -p /etc/$_f "${named_chrootdir}/etc/$_f" fi + done } # Make symlinks to the correct pid file P.S.: diff may be broken. Had to cut&paste this PR to another box because the broken FreeBSD.org-MX kept rejecting my mail. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080225231551.812E5B853>