]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cover quoted key names in checkconf 12386/head
authorNicki Křížek <nicki@isc.org>
Fri, 10 Jul 2026 11:47:46 +0000 (11:47 +0000)
committerNicki Křížek <nicki@isc.org>
Thu, 23 Jul 2026 08:48:04 +0000 (10:48 +0200)
The logfileconfig configs used to define an unquoted hyphenated
`key rndc-key` referenced as `keys { "rndc-key"; }`, incidentally
covering quoted/unquoted key-name interchangeability.  Now that those
configs use the shared controls include, keep that parser coverage in
a checkconf test.

Assisted-by: Claude:claude-fable-5
bin/tests/system/checkconf/good-quoted-key-names.conf [new file with mode: 0644]

diff --git a/bin/tests/system/checkconf/good-quoted-key-names.conf b/bin/tests/system/checkconf/good-quoted-key-names.conf
new file mode 100644 (file)
index 0000000..a7a005d
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Key names may be quoted or unquoted, in both definitions and
+ * references, and a hyphenated name works in either form.
+ */
+key rndc-key {
+       algorithm hmac-sha256;
+       secret "1234abcd8765";
+};
+
+key "rndc_key" {
+       algorithm hmac-sha256;
+       secret "1234abcd8765";
+};
+
+controls {
+       inet 127.0.0.1 port 953 allow { any; } keys { "rndc-key"; rndc_key; };
+};