2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

2941. [bug] sdb and sdlz (dlz's zone database) failed to support

DNAME at the zone apex.  [RT #21610]
This commit is contained in:
Mark Andrews
2010-08-16 04:49:14 +00:00
parent 8171f2c3dd
commit 8bc194b266
15 changed files with 177 additions and 49 deletions

View File

@@ -1,3 +1,6 @@
2941. [bug] sdb and sdlz (dlz's zone database) failed to support
DNAME at the zone apex. [RT #21610]
2940. [port] Remove connection aborted error message on
Windows. [RT #21549]

View File

@@ -15,7 +15,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: conf.sh.in,v 1.50 2010/08/11 18:14:18 each Exp $
# $Id: conf.sh.in,v 1.51 2010/08/16 04:46:15 marka Exp $
#
# Common configuration data for system tests, to be sourced into
@@ -51,10 +51,11 @@ PK11DEL="$TOP/bin/pkcs11/pkcs11-destroy -s 0 -p 1234"
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# v6synth
SUBDIRS="acl addzone autosign cacheclean checkconf checknames dlv dnssec
forward glue ixfr limits lwresd masterfile masterformat metadata notify
nsupdate pending pkcs11 resolver rrsetorder sortlist smartsign stub tkey
unknown upforwd views xfer xferquota zonechecks"
SUBDIRS="acl addzone autosign cacheclean checkconf checknames
dlv @DLZ_SYSTEM_TEST@ dnssec forward glue ixfr limits lwresd
masterfile masterformat metadata notify nsupdate pending pkcs11
resolver rrsetorder sortlist smartsign stub tkey unknown upforwd
views xfer xferquota zonechecks"
# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@

View File

@@ -0,0 +1,21 @@
#!/bin/sh
#
# Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.2 2010/08/16 04:46:15 marka Exp $
rm -f dig.out.*
rm -f */named.memstats
rm -f */named.run

View File

@@ -0,0 +1,7 @@
Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: DNAME=10=example.net.=,v 1.2 2010/08/16 04:46:15 marka Exp $
The contents of this file is not read by the filesystem driver.
This is the file for "DNAME 10 example.net.".

View File

@@ -0,0 +1,7 @@
Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: NS=10=example.com.=,v 1.1 2010/08/16 04:46:15 marka Exp $
The contents of this file is not read by the filesystem driver.
This is the file for "NS 10 example.com.".

View File

@@ -0,0 +1,7 @@
Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: SOA=10=ns.example.com.=root.example.com.=2010062900=0=0=0=10=,v 1.1 2010/08/16 04:46:15 marka Exp $
The contents of this file is not read by the filesystem driver.
This is the file for "SOA 10 ns.example.com. root.example.com. 2010062900 0 0 0 10".

View File

@@ -0,0 +1,7 @@
Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: 10.53.0.1,v 1.2 2010/08/16 04:46:16 marka Exp $
The contents of this file are not read by the filesystem driver.
The presence of this file allows 10.53.0.1 to transfer this zone.

View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.2 2010/08/16 04:46:15 marka Exp $ */
controls { /* empty */ };
options {
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
recursion no;
};
dlz "file system zone" {
database "filesystem dns-root/ dns.d xfr.d 0 =";
};

View File

@@ -0,0 +1,43 @@
#!/bin/sh
#
# Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.2 2010/08/16 04:46:15 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
n=0
rm -f dig.out.*
DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
# Check the example.com. domain
echo "I:checking DNAME at apex works ($n)"
ret=0
$DIG $DIGOPTS +norec foo.example.com. \
@10.53.0.1 a > dig.out.ns1.test$n || ret=1
grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
grep "example.com..*DNAME.*example.net." dig.out.ns1.test$n > /dev/null || ret=1
grep "foo.example.com..*CNAME.*foo.example.net." dig.out.ns1.test$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status

55
configure vendored
View File

@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
# $Id: configure,v 1.483 2010/06/22 04:03:38 marka Exp $
# $Id: configure,v 1.484 2010/08/16 04:49:14 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
@@ -29,7 +29,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# From configure.in Revision: 1.500 .
# From configure.in Revision: 1.501 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.62.
#
@@ -1066,6 +1066,7 @@ DLZ_DRIVER_INCLUDES
DLZ_DRIVER_LIBS
DLZ_DRIVER_SRCS
DLZ_DRIVER_OBJS
DLZ_SYSTEM_TEST
BUILD_CC
BUILD_CFLAGS
BUILD_CPPFLAGS
@@ -4094,7 +4095,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4097 "configure"' > conftest.$ac_ext
echo '#line 4098 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7092,11 +7093,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7095: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7096: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7099: \$? = $ac_status" >&5
echo "$as_me:7100: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7382,11 +7383,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7385: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7386: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7389: \$? = $ac_status" >&5
echo "$as_me:7390: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7486,11 +7487,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7489: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7490: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7493: \$? = $ac_status" >&5
echo "$as_me:7494: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9886,7 +9887,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9889 "configure"
#line 9890 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9986,7 +9987,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9989 "configure"
#line 9990 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12399,11 +12400,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12402: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12403: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12406: \$? = $ac_status" >&5
echo "$as_me:12407: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12503,11 +12504,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12506: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12507: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12510: \$? = $ac_status" >&5
echo "$as_me:12511: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14086,11 +14087,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14089: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14090: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14093: \$? = $ac_status" >&5
echo "$as_me:14094: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14190,11 +14191,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14193: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14194: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14197: \$? = $ac_status" >&5
echo "$as_me:14198: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16409,11 +16410,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16412: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16413: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16416: \$? = $ac_status" >&5
echo "$as_me:16417: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16699,11 +16700,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16702: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16703: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16706: \$? = $ac_status" >&5
echo "$as_me:16707: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16803,11 +16804,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16806: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16807: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16810: \$? = $ac_status" >&5
echo "$as_me:16811: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -33953,6 +33954,7 @@ DLZ_DRIVER_INCLUDES=""
DLZ_DRIVER_LIBS=""
DLZ_DRIVER_SRCS=""
DLZ_DRIVER_OBJS=""
DLZ_SYSTEM_TEST=""
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
#
@@ -34419,7 +34421,7 @@ $as_echo "no" >&6; }
DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS "
fi
DLZ_SYSTEM_TEST=dlz
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
;;
@@ -34648,6 +34650,7 @@ fi
if test "$cross_compiling" = "yes"; then
if test -z "$BUILD_CC"; then
{ { $as_echo "$as_me:$LINENO: error: BUILD_CC not set" >&5

View File

@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.500 $)
AC_REVISION($Revision: 1.501 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
@@ -3040,6 +3040,7 @@ DLZ_DRIVER_INCLUDES=""
DLZ_DRIVER_LIBS=""
DLZ_DRIVER_SRCS=""
DLZ_DRIVER_OBJS=""
DLZ_SYSTEM_TEST=""
sinclude(contrib/dlz/config.dlz.in)
@@ -3061,6 +3062,7 @@ AC_SUBST(DLZ_DRIVER_INCLUDES)
AC_SUBST(DLZ_DRIVER_LIBS)
AC_SUBST(DLZ_DRIVER_SRCS)
AC_SUBST(DLZ_DRIVER_OBJS)
AC_SUBST(DLZ_SYSTEM_TEST)
AC_SUBST_FILE(DLZ_DRIVER_RULES)
if test "$cross_compiling" = "yes"; then

View File

@@ -339,7 +339,7 @@ case "$use_dlz_filesystem" in
;;
*)
DLZ_ADD_DRIVER(FILESYSTEM, dlz_filesystem_driver)
DLZ_SYSTEM_TEST=dlz
AC_MSG_RESULT(yes)
;;
esac

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sdb.c,v 1.73 2010/02/25 05:08:01 tbox Exp $ */
/* $Id: sdb.c,v 1.74 2010/08/16 04:46:16 marka Exp $ */
/*! \file */
@@ -836,13 +836,6 @@ find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
result = DNS_R_NXDOMAIN;
for (i = olabels; i <= nlabels; i++) {
/*
* Unless this is an explicit lookup at the origin, don't
* look at the origin.
*/
if (i == olabels && i != nlabels)
continue;
/*
* Look up the next label.
*/

View File

@@ -50,7 +50,7 @@
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sdlz.c,v 1.24 2010/02/25 05:08:01 tbox Exp $ */
/* $Id: sdlz.c,v 1.25 2010/08/16 04:46:16 marka Exp $ */
/*! \file */
@@ -800,13 +800,6 @@ find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
result = DNS_R_NXDOMAIN;
for (i = olabels; i <= nlabels; i++) {
/*
* Unless this is an explicit lookup at the origin, don't
* look at the origin.
*/
if (i == olabels && i != nlabels)
continue;
/*
* Look up the next label.
*/

View File

@@ -666,6 +666,13 @@
./bin/tests/system/dlv/ns6/sign.sh SH 2010
./bin/tests/system/dlv/setup.sh SH 2004,2007,2009
./bin/tests/system/dlv/tests.sh SH 2004,2007,2010
./bin/tests/system/dlz/clean.sh SH 2010
./bin/tests/system/dlz/ns1/dns-root/com/example/dns.d/@/DNAME=10=example.net.= TXT.BRIEF 2010
./bin/tests/system/dlz/ns1/dns-root/com/example/dns.d/@/NS=10=example.com.= TXT.BRIEF 2010
./bin/tests/system/dlz/ns1/dns-root/com/example/dns.d/@/SOA=10=ns.example.com.=root.example.com.=2010062900=0=0=0=10= TXT.BRIEF 2010
./bin/tests/system/dlz/ns1/dns-root/com/example/xfr.d/10.53.0.1 TXT.BRIEF 2010
./bin/tests/system/dlz/ns1/named.conf CONF-C 2010
./bin/tests/system/dlz/tests.sh SH 2010
./bin/tests/system/dnssec/README TXT.BRIEF 2000,2001,2002,2004
./bin/tests/system/dnssec/clean.sh SH 2000,2001,2002,2004,2007,2008,2009,2010
./bin/tests/system/dnssec/dnssec_update_test.pl PERL 2002,2004,2007,2010