Skip to content

Commit e768b75

Browse files
committed
metaconfig/named: fix validation of logging channels in categories
Fixes #1784
1 parent 124f057 commit e768b75

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ncm-metaconfig/src/main/metaconfig/named/pan/schema.pan

+4-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ type named_zone = {
9595
true;
9696
};
9797

98-
type named_channel_name = string with
99-
exists ("/software/components/metaconfig/services/{/etc/named.conf}/contents/logging/" + SELF) ||
100-
error (SELF + " doesn't refer to a logging channel");
98+
type named_channel_name = string with exists (
99+
format("/software/components/metaconfig/services/{/etc/named.conf}/contents/logging/channels/%s", SELF)) || error (
100+
"%s doesn't refer to a logging channel", SELF,
101+
);
101102

102103
@{
103104
Named log parameters

ncm-metaconfig/src/main/metaconfig/named/tests/profiles/config.pan

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ prefix "/software/components/metaconfig/services/{/etc/named.conf}/contents";
77
"logging/channels/default_debug" = dict (
88
"severity", "dynamic",
99
"file", "data/named.run");
10-
"logging/category" = dict();
10+
"logging/category" = dict(
11+
"queries", list("default_debug"),
12+
);
1113
"includes" = append("/etc/named.rfc1912.zones");
1214
"includes" = append("/etc/another.conf");
1315

0 commit comments

Comments
 (0)