Skip to content

Commit

Permalink
metaconfig/named: fix validation of logging channels in categories
Browse files Browse the repository at this point in the history
Fixes #1784
  • Loading branch information
jouvin committed Dec 11, 2024
1 parent 124f057 commit e768b75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions ncm-metaconfig/src/main/metaconfig/named/pan/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ type named_zone = {
true;
};

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

@{
Named log parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ prefix "/software/components/metaconfig/services/{/etc/named.conf}/contents";
"logging/channels/default_debug" = dict (
"severity", "dynamic",
"file", "data/named.run");
"logging/category" = dict();
"logging/category" = dict(
"queries", list("default_debug"),
);
"includes" = append("/etc/named.rfc1912.zones");
"includes" = append("/etc/another.conf");

Expand Down

0 comments on commit e768b75

Please sign in to comment.