Univention Bugzilla – Bug 57013
BIND9 includes temporary files as zone; crashes
Last modified: 2024-03-07 13:07:33 CET
I was investigating a BIND9 zone file and opened it in `vim`, which creates a temporary file in /etc/bind/univention.conf.d/. I then triggered some zone change, which included in `/etc/bind/univention.conf`: > include "/etc/bind/univention.conf.d/.256.in-addr.arpa.swp"; That change also triggered a reload of BIND9, which then crashed and failed to start again: ``` Jan 31 05:33:06 dc20 named[20315]: loading configuration from '/etc/bind/named.conf' Jan 31 05:33:06 dc20 named[20315]: /etc/bind/univention.conf.d/.256.in-addr.arpa.swp:1: unknown option 'b0VIM' ``` This is caused by `services/univention-bind/bind.py:postrun()`: ```python 365 for f in os.listdir(NAMED_CONF_DIR): 366 if not f.endswith('.proxy'): 367 named_conf.write('include "%s";\n' % _quote_config_parameter(os.path.join(NAMED_CONF_DIR, f))) 368 else: 369 proxy_conf.write('include "%s";\n' % _quote_config_parameter(os.path.join(NAMED_CONF_DIR, f))) ``` `listdir()` returns all files including "hidden files".
[bug/50385] e5f04c9e89 refactor(DNS): valid zone file name services/univention-bind/bind.py | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) [bug/50385] c6fa169743 fix(DNS): Ignore invalid zone files doc/errata/staging/univention-bind.yaml | 6 ++++-- services/univention-bind/bind.py | 8 +++++--- services/univention-bind/debian/changelog | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) Package: univention-bind Version: 14.0.6-1 Branch: ucs_5.0-0 Scope: errata5.0-6 Package: univention-directory-manager-modules Version: 15.0.25-16 Branch: ucs_5.0-0 Scope: errata5.0-6
OK: invalid DNS zone files are ignored by the listener OK: advisory
<https://errata.software-univention.de/#/?erratum=5.0x985>