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

[master] reject $ORIGIN before inherited name

3445.	[bug]		Reject zone files with blank owner names immediately
			after $ORIGIN directives. [RT #31848]
This commit is contained in:
Evan Hunt
2012-12-18 16:17:55 -08:00
parent be59cf03c2
commit 3ad3e9c948
6 changed files with 71 additions and 3 deletions

View File

@@ -622,6 +622,29 @@ ATF_TC_BODY(dumpraw, tc) {
dns_test_end();
}
/* Origin change test */
ATF_TC(neworigin);
ATF_TC_HEAD(neworigin, tc) {
atf_tc_set_md_var(tc, "descr", "dns_master_loadfile() rejects "
"zones with inherited name following "
"$ORIGIN");
}
ATF_TC_BODY(neworigin, tc) {
isc_result_t result;
UNUSED(tc);
result = dns_test_begin(NULL, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
setup_master();
result = test_master("testdata/master/master17.data",
dns_masterformat_text);
ATF_REQUIRE_EQ(result, DNS_R_UNSAFENAME);
dns_test_end();
}
/*
* Main
*/
@@ -643,6 +666,7 @@ ATF_TP_ADD_TCS(tp) {
ATF_TP_ADD_TC(tp, dumpraw);
ATF_TP_ADD_TC(tp, toobig);
ATF_TP_ADD_TC(tp, maxrdata);
ATF_TP_ADD_TC(tp, neworigin);
return (atf_no_error());
}