Bug 1315821
| Summary: | rndc addzone/delzone unusable due to RPM packaging or missing BIND configuration option | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Robert Scheck <redhat-bugzilla> | ||||||||
| Component: | bind | Assignee: | Petr Menšík <pemensik> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Petr Sklenar <psklenar> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 7.2 | CC: | mosvald, pemensik, psklenar, rfreire, robert.scheck, thozza | ||||||||
| Target Milestone: | rc | Keywords: | TestOnly | ||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2018-10-30 10:18:33 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | 1569466, 1572647, 1633158 | ||||||||||
| Bug Blocks: | 1298243, 1380362, 1393869, 1420851, 1465887, 1465928, 1477664, 1534569, 1549614 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Robert Scheck
2016-03-08 17:17:55 UTC
Cross-filed case 01597035 on the Red Hat customer portal. Just to clarify: The issue is not the zonefile itself, but the NZF file that is managed by addzone/delzone. Hello. Thank you for reporting this bug. The fact that /var/named/ is not writable by default by named group is intentional. The reason is to restrict write access only to root and in case the administrator wants to make it writable also to named group, they have to make a conscious decision. You can argue that there is the SELinux variable you have to set. While this is true, Not everybody uses SELinux and therefore the filesystem permissions are used as a general way do restrict the write access only to root. Some old references on why it is so: https://bugzilla.redhat.com/show_bug.cgi?id=125518#c10 https://bugzilla.redhat.com/show_bug.cgi?id=126638#c6 In case you find the documentation provided by Red Hat incomplete I can extend it to discuss also this situation. However I don't consider the current state a Bug, since it is intentional. Also for the reasons described above I'm reluctant to changing the permissions to writable by named group. Please note that the default configuration shipped by Red Hat configures BIND as a local validating recursive resolver, not as an authoritative server. So as a first step I thing we can provide better documentation on what needs to be changed for this use case. As a second step I'll contact upstream and see if they would be willing to have a configuration option for specifying where are the .nzf files created. However this will be considered a Feature request. I'm also not sure if upstream will accept such change. Thomas, thanks for your verbose reply. I agree that /var/named/ should be not writable by default and a configuration option would be better. The raised issue is not a documentation one. I understand that the default configuration as shipped with RHEL is different from the usecase, but given it's a BIND, it simply can be configured to act as authoritative server. Martin Osvald already spent some time with this - no matter if he was in touch with you or not. If not, please get in touch with him first to avoid double efforts for the same. Thanks for the reply Robert. Martin, co you have some draft of the patch? In the customer case I saw that you are working on something. Thank you in advance. I am aware about the current ticket status, but I wonder about the patch that was mentioned, I'm also happy to test something or similar (note, this is just about technical stuff, not organisational). Created attachment 1262015 [details]
bind9.9 new-zones-directory patch
Prepared patch to add new-zones-directory. Reported to ISC as [ISC-Bugs #44853]
Created attachment 1265360 [details]
bind 9.9. new-zones-directory patch with legacy
Modified patch that will use files in default directory if they do not exist in new-zones-directory. That should simplify upgrade of default configuration significantly. Provides also basic unit test.
I got bind-9.9.4-38.el7_3.3.test.x86_64 via GSS for testing. Not sure if that package contains the latest version of the patch, but after adding allow-new-zones yes; to /etc/named.conf, any restart of BIND (without any zone created etc.) leads to this (new) log entry: Apr 11 19:39:25 tux named[1287]: open: 3bf305731dd26307.nzf: file not found Further, once I add new-zones-directory "/var/named/dynamic"; additionally to /etc/named.conf, any restart of BIND (without any zone created etc.) leads to this (new) log entry: Apr 11 19:37:18 tux named[1258]: open: ↲ /var/named/dynamic/3bf305731dd26307.nzf: file not found Not sure if this is really intended. Aside from this, "rndc addzone" and "rndc delzone" seems to work as expected. Hello, I am sorry for late reply. new-zones-directory was merged upstream in bug https://bugs.isc.org/Public/Bug/Display.html?id=44853 I backported sligtly different version to match upstream more closely. However logged errors are still present also in latest bind, reported as bug [ISC-Bugs #46186]. Created attachment 1334898 [details]
new-zones-directory patch
Upstream version of patch, corrects also logging of errors when allow-new-zones is set to yes, but nzf files are not yet created.
Petr, given [ISC-Bugs #46186] is not public, can you please report here whether it is resolved or not? If not, could you create a public clone at gitlab.isc.org, please? Thanks :) *** Bug 1572374 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3136 |