Fixes for #5449: Add include directory for custom BIND options - #5588
Fixes for #5449: Add include directory for custom BIND options#5588maloo1 wants to merge 1 commit into
Conversation
| if (count(glob('/usr/local/etc/namedb/named.conf.d/*')) > 1 | ||
| or count(glob('/usr/local/etc/namedb/named-options.conf.d/*')) > 1) { |
There was a problem hiding this comment.
Using a different glob on the directories than in the include statements is a bit odd and leads to a warning message, even though no config file actually gets included.
Yes, it is the same pattern as in #4773, but should be fixed in both places.
There was a problem hiding this comment.
Hi @cm-rudolph - Thanks for taking a look, I'm not sure I understand what you mean though? There are two include directories the new one I've added for options on line 12: include "/usr/local/etc/namedb/named-options.conf.d/*.conf";
And the existing one added in #4773 on line 116:
include "/usr/local/etc/namedb/named.conf.d/*.conf";
I have tested the following on my setup:
- No added config changes in the include dirs: No warning is displayed
- Added a file to the new options include dir: The warning gets displayed
- Also added a file to the old include dir: The warning is still displayed
- Removed the added file from the new options include dir: The warning is still displayed (because of tge file in the existing include dir)
- Removed both added files: No warning is displayed
There was a problem hiding this comment.
Hi @maloo1,
let's assume somebody stores some configuration options in /usr/local/etc/namedb/named-options.conf.d/myoption. The UI would indicate that some manual config probably overwrites config from the UI. But the myoption file isn't loaded, due to the missing .conf file extension.
Line 50 and 51 should read (untested):
if (count(glob('/usr/local/etc/namedb/named.conf.d/*.conf')) > 1
or count(glob('/usr/local/etc/namedb/named-options.conf.d/*.conf')) > 1) {Best regards
Christian
There was a problem hiding this comment.
Oh thank you @cm-rudolph now I understand! I'll update and test tomorrow, but it will need to be > 0 (since in #4773 and my change we were accounting for the README.txt!!)
Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:
If AI was used, please disclose:
Describe the problem
There are a number of cases where it would be nice to add custom options to bind.
One of these is to enable DoT forwarders.
Describe the proposed solution
this solution is an extension on #4773 to add a directory to allow custom bind options to be added
Related issue
This change closes #5449, #5546 and #1715