From fc50a4445877e6be4d641685bf0019b89fd519de Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Tue, 22 Jan 2002 17:22:41 +0000 Subject: [PATCH] Do not taint ::/124 for localhost reverse table. --- etc/namedb/PROTO.localhost-v6.rev | 17 +++++++++++++++++ etc/namedb/make-localhost | 7 +++++++ etc/namedb/named.conf | 4 ++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 etc/namedb/PROTO.localhost-v6.rev diff --git a/etc/namedb/PROTO.localhost-v6.rev b/etc/namedb/PROTO.localhost-v6.rev new file mode 100644 index 000000000000..1616771235d5 --- /dev/null +++ b/etc/namedb/PROTO.localhost-v6.rev @@ -0,0 +1,17 @@ +; From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90 +; $FreeBSD$ +; +; This file is automatically edited by the `make-localhost' script in +; the /etc/namedb directory. +; + +$TTL 3600 + +@ IN SOA @host@. root.@host@. ( + @date@ ; Serial + 3600 ; Refresh + 900 ; Retry + 3600000 ; Expire + 3600 ) ; Minimum + IN NS @host@. + IN PTR localhost.@domain@. diff --git a/etc/namedb/make-localhost b/etc/namedb/make-localhost index 704fd557deb4..f3f0b1d20ba2 100755 --- a/etc/namedb/make-localhost +++ b/etc/namedb/make-localhost @@ -32,6 +32,13 @@ fi date=`date +"%Y%m%d"` +mv -f localhost-v6.rev localhost-v6.rev.BAK 2>/dev/null + +sed -e "s/@host@/$fullhost/g" \ + -e "s/@domain@/$domain/g" \ + -e "s/@date@/$date/g" \ + < PROTO.localhost-v6.rev > localhost-v6.rev + mv -f localhost.rev localhost.rev.BAK 2>/dev/null exec sed -e "s/@host@/$fullhost/g" \ diff --git a/etc/namedb/named.conf b/etc/namedb/named.conf index 15a505209cca..aba36dcb2e46 100644 --- a/etc/namedb/named.conf +++ b/etc/namedb/named.conf @@ -66,9 +66,9 @@ zone "0.0.127.IN-ADDR.ARPA" { file "localhost.rev"; }; -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.INT" { +zone "1.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.INT" { type master; - file "localhost.rev"; + file "localhost-v6.rev"; }; // NB: Do not use the IP addresses below, they are faked, and only