4014. [bug] When including a master file origin_changed was

not being properly set leading to a potentially
                        spurious 'inherited owner' warning. [RT #37919]

(cherry picked from commit 6444de08d1)
This commit is contained in:
Mark Andrews
2014-12-03 09:46:28 +11:00
parent f1c0eff9e6
commit 301160944f
7 changed files with 47 additions and 4 deletions
+6 -2
View File
@@ -1,3 +1,7 @@
4014. [bug] When including a master file origin_changed was
not being properly set leading to a potentially
spurious 'inherited owner' warning. [RT #37919]
4012. [bug] Check returned status of OpenSSL digest and HMAC
functions when they return one. Note this applies
only to FIPS capable OpenSSL libraries put in
@@ -74,7 +78,7 @@
3971. [bug] Reduce the cascading failures due to a bad $TTL line
in named-checkconf / named-checkzone. [RT #37138]
3970. [contrib] Fixed a use after free bug in the SDB LDAP driver.
3970. [contrib] Fixed a use after free bug in the SDB LDAP driver.
[RT #37237]
3968. [bug] Silence spurious log messages when using 'named -[46]'.
@@ -157,7 +161,7 @@
3922. [bug] When resigning, dnssec-signzone was removing
all signatures from delegation nodes. It now
retains DS and (if applicable) NSEC signatures.
retains DS and (if applicable) NSEC signatures.
[RT #36946]
3921. [bug] AD was inappropriately set on RPZ responses. [RT #36833]
+25
View File
@@ -54,4 +54,29 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking for no 'inherited owner' warning on '\$INCLUDE file' with no new \$ORIGIN ($n)"
ret=0
$CHECKZONE example zones/nowarn.inherited.owner.db > test.out1.$n 2>&1 || ret=1
grep "inherited.owner" test.out1.$n > /dev/null && ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking for 'inherited owner' warning on '\$ORIGIN + \$INCLUDE file' ($n)"
ret=0
$CHECKZONE example zones/warn.inherit.origin.db > test.out1.$n 2>&1 || ret=1
grep "inherited.owner" test.out1.$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking for 'inherited owner' warning on '\$INCLUDE file origin' ($n)"
ret=0
$CHECKZONE example zones/warn.inherited.owner.db > test.out1.$n 2>&1 || ret=1
grep "inherited.owner" test.out1.$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
@@ -0,0 +1 @@
NS .
@@ -0,0 +1,2 @@
@ 0 IN SOA . . 0 0 0 0 0
$INCLUDE "zones/inherit.db"
@@ -0,0 +1,3 @@
@ 0 IN SOA . . 0 0 0 0 0
$ORIGIN @
$INCLUDE "zones/inherit.db"
@@ -0,0 +1,2 @@
@ 0 IN SOA . . 0 0 0 0 0
$INCLUDE "zones/inherit.db" @
+8 -2
View File
@@ -514,6 +514,7 @@ incctx_create(isc_mem_t *mctx, dns_name_t *origin, dns_incctx_t **ictxp) {
ictx->drop = ISC_FALSE;
ictx->glue_line = 0;
ictx->current_line = 0;
ictx->origin_changed = ISC_TRUE;
*ictxp = ictx;
return (ISC_R_SUCCESS);
@@ -1118,7 +1119,6 @@ load_text(dns_loadctx_t *lctx) {
line = isc_lex_getsourceline(lctx->lex);
source = isc_lex_getsourcename(lctx->lex);
ictx = lctx->inc;
EXPECTEOL;
continue;
}
done = ISC_TRUE;
@@ -1208,7 +1208,6 @@ load_text(dns_loadctx_t *lctx) {
token.type == isc_tokentype_eof) {
if (token.type == isc_tokentype_eof)
WARNUNEXPECTEDEOF(lctx->lex);
isc_lex_ungettoken(lctx->lex, &token);
/*
* No origin field.
*/
@@ -1427,6 +1426,7 @@ load_text(dns_loadctx_t *lctx) {
}
if (finish_include) {
finish_include = ISC_FALSE;
EXPECTEOL;
result = pushfile(include_file, new_name, lctx);
if (MANYERRS(lctx, result)) {
SETRESULT(lctx, result);
@@ -1437,6 +1437,7 @@ load_text(dns_loadctx_t *lctx) {
goto insist_and_cleanup;
}
ictx = lctx->inc;
ictx->origin_changed = ISC_TRUE;
source = isc_lex_getsourcename(lctx->lex);
line = isc_lex_getsourceline(lctx->lex);
POST(line);
@@ -2057,6 +2058,11 @@ pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
if (result != ISC_R_SUCCESS)
return (result);
/*
* Push origin_changed.
*/
new->origin_changed = ictx->origin_changed;
/* Set current domain. */
if (ictx->glue != NULL || ictx->current != NULL) {
for (new_in_use = 0; new_in_use < NBUFS; new_in_use++)