From 4286f51dbed5ec232b668cb33cba26d3211bffee Mon Sep 17 00:00:00 2001 From: jakob <> Date: Sun, 16 Dec 2007 21:34:56 +0000 Subject: [PATCH] remove localhost. zone (localhost. queries are handled by /etc/hosts) replace IPv4 and IPv6 loopback zones with BIND's autogenerated empty zones. move root.hint to /var/named/etc remove empty directory /var/named/standard --- src/etc/Makefile | 10 ++-------- src/etc/bind/db.localhost | 15 --------------- src/etc/bind/db.loopback | 14 -------------- src/etc/bind/db.loopback6.arpa | 14 -------------- src/etc/bind/named-dual.conf | 26 ++++---------------------- src/etc/bind/named-simple.conf | 24 ++++-------------------- src/etc/mtree/4.4BSD.dist | 7 +------ 7 files changed, 11 insertions(+), 99 deletions(-) delete mode 100644 src/etc/bind/db.localhost delete mode 100644 src/etc/bind/db.loopback delete mode 100644 src/etc/bind/db.loopback6.arpa diff --git a/src/etc/Makefile b/src/etc/Makefile index ac1a1161..9a303882 100644 --- a/src/etc/Makefile +++ b/src/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.256 2007/12/07 17:13:35 deraadt Exp $ +# $OpenBSD: Makefile,v 1.257 2007/12/16 21:34:56 jakob Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -169,14 +169,8 @@ distribution-etc-root-var: distrib-dirs ${DESTDIR}/var/named/etc/named.conf; \ ${INSTALL} -c -o root -g named -m 640 named-*.conf \ ${DESTDIR}/var/named/etc; \ - ${INSTALL} -c -o root -g wheel -m 644 db.localhost \ - ${DESTDIR}/var/named/standard/localhost; \ - ${INSTALL} -c -o root -g wheel -m 644 db.loopback \ - ${DESTDIR}/var/named/standard/loopback; \ - ${INSTALL} -c -o root -g wheel -m 644 db.loopback6.arpa \ - ${DESTDIR}/var/named/standard/loopback6.arpa; \ ${INSTALL} -c -o root -g wheel -m 644 root.hint \ - ${DESTDIR}/var/named/standard; \ + ${DESTDIR}/var/named/etc; \ /bin/rm -f ${DESTDIR}/etc/localtime ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime /bin/rm -f ${DESTDIR}/etc/rmt diff --git a/src/etc/bind/db.localhost b/src/etc/bind/db.localhost deleted file mode 100644 index 340e9895..00000000 --- a/src/etc/bind/db.localhost +++ /dev/null @@ -1,15 +0,0 @@ -; $OpenBSD: db.localhost,v 1.2 2005/02/07 06:08:10 david Exp $ - -$ORIGIN localhost. -$TTL 6h - -@ IN SOA localhost. root.localhost. ( - 1 ; serial - 1h ; refresh - 30m ; retry - 7d ; expiration - 1h ) ; minimum - - NS localhost. - A 127.0.0.1 - AAAA ::1 diff --git a/src/etc/bind/db.loopback b/src/etc/bind/db.loopback deleted file mode 100644 index 9badc8ba..00000000 --- a/src/etc/bind/db.loopback +++ /dev/null @@ -1,14 +0,0 @@ -; $OpenBSD: db.loopback,v 1.2 2005/02/07 06:08:10 david Exp $ - -$ORIGIN 127.in-addr.arpa. -$TTL 6h - -@ IN SOA localhost. root.localhost. ( - 1 ; serial - 1h ; refresh - 30m ; retry - 7d ; expiration - 1h ) ; minimum - - NS localhost. -1.0.0 PTR localhost. diff --git a/src/etc/bind/db.loopback6.arpa b/src/etc/bind/db.loopback6.arpa deleted file mode 100644 index 558fa236..00000000 --- a/src/etc/bind/db.loopback6.arpa +++ /dev/null @@ -1,14 +0,0 @@ -; $OpenBSD: db.loopback6.arpa,v 1.2 2005/02/07 06:08:10 david Exp $ - -$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. -$TTL 6h - -@ IN SOA localhost. root.localhost. ( - 1 ; serial - 1h ; refresh - 30m ; retry - 7d ; expiration - 1h ) ; minimum - - NS localhost. -1 PTR localhost. diff --git a/src/etc/bind/named-dual.conf b/src/etc/bind/named-dual.conf index 878c5680..4ce155d3 100644 --- a/src/etc/bind/named-dual.conf +++ b/src/etc/bind/named-dual.conf @@ -1,4 +1,4 @@ -// $OpenBSD: named-dual.conf,v 1.7 2007/12/13 07:45:03 jakob Exp $ +// $OpenBSD: named-dual.conf,v 1.8 2007/12/16 21:34:56 jakob Exp $ // // Example file for a named configuration with dual views, // one processing recursive queries only and one processing @@ -20,6 +20,8 @@ options { listen-on { any; }; listen-on-v6 { any; }; + + empty-zones-enable yes; }; logging { @@ -31,29 +33,9 @@ view "recursive" { match-recursive-only yes; allow-recursion { clients; }; - // Standard zones - // zone "." { type hint; - file "standard/root.hint"; - }; - - zone "localhost" { - type master; - file "standard/localhost"; - allow-transfer { localhost; }; - }; - - zone "127.in-addr.arpa" { - type master; - file "standard/loopback"; - allow-transfer { localhost; }; - }; - - zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { - type master; - file "standard/loopback6.arpa"; - allow-transfer { localhost; }; + file "etc/root.hint"; }; zone "com" { diff --git a/src/etc/bind/named-simple.conf b/src/etc/bind/named-simple.conf index 088a103a..b5021956 100644 --- a/src/etc/bind/named-simple.conf +++ b/src/etc/bind/named-simple.conf @@ -1,4 +1,4 @@ -// $OpenBSD: named-simple.conf,v 1.6 2004/08/16 15:48:28 jakob Exp $ +// $OpenBSD: named-simple.conf,v 1.7 2007/12/16 21:34:56 jakob Exp $ // // Example file for a simple named configuration, processing both // recursive and authoritative queries using one cache. @@ -20,6 +20,8 @@ options { listen-on { any; }; listen-on-v6 { any; }; + empty-zones-enable yes; + allow-recursion { clients; }; }; @@ -31,25 +33,7 @@ logging { // zone "." { type hint; - file "standard/root.hint"; -}; - -zone "localhost" { - type master; - file "standard/localhost"; - allow-transfer { localhost; }; -}; - -zone "127.in-addr.arpa" { - type master; - file "standard/loopback"; - allow-transfer { localhost; }; -}; - -zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { - type master; - file "standard/loopback6.arpa"; - allow-transfer { localhost; }; + file "etc/root.hint"; }; zone "com" { diff --git a/src/etc/mtree/4.4BSD.dist b/src/etc/mtree/4.4BSD.dist index 80037138..2ca3fd31 100644 --- a/src/etc/mtree/4.4BSD.dist +++ b/src/etc/mtree/4.4BSD.dist @@ -1,4 +1,4 @@ -# $OpenBSD: 4.4BSD.dist,v 1.187 2007/08/01 21:23:26 miod Exp $ +# $OpenBSD: 4.4BSD.dist,v 1.188 2007/12/16 21:34:56 jakob Exp $ /set type=dir uname=root gname=wheel mode=0755 # . @@ -2565,11 +2565,6 @@ slave uname=root gname=named mode=0775 # ./var/named/slave .. -# ./var/named/standard -standard -# ./var/named/standard -.. - # ./var/named/tmp tmp uname=root gname=named mode=0775 # ./var/named/tmp