Check for filename clashes /w dnssec-policy zones
Just like with dynamic and/or inline-signing zones, check if no two or more zone configurations set the same filename. In these cases, the zone files are not read-only and named-checkconf should catch a configuration where multiple zone statements write to the same file. Add some bad configuration tests where KASP zones reference the same zone file. Update the good-kasp test to allow for two zones configure the same file name, dnssec-policy none.
This commit is contained in:
26
bin/tests/system/checkconf/bad-kasp10.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp10.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone with dnssec-policy 'none', one zone with dnssec-policy 'insecure',
|
||||
// both using the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "none";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "insecure";
|
||||
};
|
||||
|
||||
26
bin/tests/system/checkconf/bad-kasp11.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp11.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone with a dnssec-policy, the other with allow-update,
|
||||
// with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
allow-update { any; };
|
||||
};
|
||||
|
||||
28
bin/tests/system/checkconf/bad-kasp12.conf
Normal file
28
bin/tests/system/checkconf/bad-kasp12.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone with a dnssec-policy, the other with update-policy,
|
||||
// with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
update-policy {
|
||||
grant * self * TXT;
|
||||
};
|
||||
};
|
||||
|
||||
26
bin/tests/system/checkconf/bad-kasp13.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp13.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone transitioning to insecure, the other with allow-update,
|
||||
// with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "insecure";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
allow-update { any; };
|
||||
};
|
||||
|
||||
25
bin/tests/system/checkconf/bad-kasp6.conf
Normal file
25
bin/tests/system/checkconf/bad-kasp6.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// Two zones with dnssec-policy with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
26
bin/tests/system/checkconf/bad-kasp7.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp7.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// Two zones with dnssec-policy 'insecure' (transitioning to insecure)
|
||||
// with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "insecure";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "insecure";
|
||||
};
|
||||
|
||||
26
bin/tests/system/checkconf/bad-kasp8.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp8.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone with dnssec-policy, the other zone has 'dnssec-policy none',
|
||||
// both with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "none";
|
||||
};
|
||||
|
||||
26
bin/tests/system/checkconf/bad-kasp9.conf
Normal file
26
bin/tests/system/checkconf/bad-kasp9.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
// One zone with dnssec-policy, the other zone has 'dnssec-policy insecure'
|
||||
// (transitioning to inseure), both with the same zone file.
|
||||
|
||||
zone "example1.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
|
||||
zone "example2.net" {
|
||||
type master;
|
||||
file "example.db";
|
||||
dnssec-policy "insecure";
|
||||
};
|
||||
|
||||
@@ -49,8 +49,13 @@ zone "example3" {
|
||||
file "example3.db";
|
||||
dnssec-policy "default";
|
||||
};
|
||||
zone "example4" {
|
||||
zone "dnssec-policy-none-shared-zonefile1" {
|
||||
type master;
|
||||
file "example4.db";
|
||||
file "shared.db";
|
||||
dnssec-policy "none";
|
||||
};
|
||||
zone "dnssec-policy-none-shared-zonefile2" {
|
||||
type master;
|
||||
file "shared.db";
|
||||
dnssec-policy "none";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user