Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2018 20:02:12 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 229125] dns/bind911 fatal error with LMDB and allow-new-zones in chrooted environment
Message-ID:  <bug-229125-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229125

            Bug ID: 229125
           Summary: dns/bind911 fatal error with LMDB and allow-new-zones
                    in chrooted environment
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mat@FreeBSD.org
          Reporter: tomas@ciernik.sk
          Assignee: mat@FreeBSD.org
             Flags: maintainer-feedback?(mat@FreeBSD.org)

Hello,

I'm unable to start bind 9.11.3 on FreeBSD 10.4-RELEASE-p9 amd64. It is bui=
lded
with default configuration options.

Steps to reproduce:

# portmaster dns/bind911
# mkdir -p /var/named/usr/local/etc
# cd /usr/local/etc/ && mv mv namedb /var/named/usr/local/etc/
# ln -s /var/named/usr/local/etc/namedb
# sysrc altlog_proglist+=3Dnamed
# printf 'named_enable=3D"YES"\nnamed_chrootdir=3D"/var/named/"\n' >>/etc/r=
c.conf

add "allow-new-zones true;" into options section of
/var/named/usr/local/etc/namedb/named.conf

# /usr/local/etc/rc.d/named start


Result:
Starting named.
/usr/local/etc/rc.d/named: WARNING: failed to start named

Content of /var/log/messages:
mdb_env_open of '_default.nzd' failed: No such file or directory
loading configuration: failure
exiting (due to fatal error)

Anyway, bind creates file _default.nzd-lock in directory
/var/named/usr/local/etc/namedb/working

# ls -l /var/named/usr/local/etc/namedb/working/
total 8
-rw-------  1 root  wheel  8192 18 j=C3=BAn 21:27 _default.nzd-lock


bind has full access to his working directory

# ls -l /var/named/usr/local/etc/namedb/ | grep working
drwxr-xr-x  2 bind  wheel    512 18 j=C3=BAn 21:28 working/


Workaround:
1. remove allow-new-zones from named.conf
or
2. remove named_chrootdir from rc.conf
or
3. disable support for LMDB

With removed named_chrootdir bind creates files _default.nzd and
_default.nzd-lock

# ls -l /var/named/usr/local/etc/namedb/working/
total 16
-rw-------  1 bind  wheel  8192 18 j=C3=BAn 21:30 _default.nzd
-rw-------  1 bind  wheel  8192 18 j=C3=BAn 21:30 _default.nzd-lock

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229125-7788>