[Samba] Removed bind 9.8 installed bind 9.9 now named will not start with samba include statement: dlz_bind9_9.so incorrect version 2 should be 1!?

Günter Kukkukk linux at kukkukk.com
Mon Jun 3 08:13:51 MDT 2013


Am Montag, 3. Juni 2013, 08:25:34 schrieb David González Herrera - [DGHVoIP]:
> On 6/3/2013 12:41 AM, Gary Maurizi wrote:
> > I removed the centos bind build and installed bind 9.9.3 from ISC source,
> > and went to /usr/local/samba/private/named.conf and changed the line from
> > bind 9.8 to bind 9.9 and now I get this error and named will not start
> > with the include line for samba in /etc/named.conf:
> > 
> > get: "dlz_dlopen: incorrect version 2 should be 1 in
> > '/usr/local/samba/lib/bind9/dlz_bind9_9.so'"
> 
> I found this, and actually solved that issue:
> source4/dns_server/dlz_minimal.h
> 
> #ifdef BIND_VERSION_9_8
> #define DLZ_DLOPEN_VERSION 1
> #else
> #define DLZ_DLOPEN_VERSION 2
> #endif
> 
> Try it.
> 
> > Help!
> > 
> > I'm guessing I have to go into my samba-master git folder and replace the
> > file dnz_bind9_9.so with another for bind 9.9.3?
> > 
> > Thank you so much,
> > GM

Please don't mess with source4/dns_server/dlz_minimal.h AT ALL!

Latest ISC bind-9.9.3 is still using "DLZ_DLOPEN_VERSION 2",
so when you properly changed /usr/local/samba/private/named.conf
to use dlz_bind9_9.so, all should work as expected.

I just did a build of bind-9.9.3 - and it's working so far.

But there can be some pitfalls when you build stuff from source.

When you just use ./configure --> make -> make install, bind will
be installed to /usr/local/.
So all init (or systemd) scripts might not work anymore.

From the error you get, my guess is, that you did not de-install  
former bind-9.8.x, so it's still used. (and/or new installed bind
cannot be found). 

What you can do when you want to install into the distro subdirs:
1.) make sure you have a distro supplied version of bind installed.
2.) as root run "named -V". This will list the installed version
    and the build options used.
3.) Create an own script e.g. "configure.your_name" in the bind source dir.
4.) in that new script set all the needed configure options and then
    call the original configure script. (see sample below)
5.) after downloading the new bind source now run ./configure.your_name
    and carefully watch for warnings/errors. Possibly dependent devel
    packages are missing.
6.) after successful "./configure.your_name" run "make"
7.) Before running "make install" (as root) I would remove the old distro
    supplied bind package using the distro tools to make sure that the new
    install is consistent and not using any former stuff!
8.) after "make install" (as root), the new version should be available.
    You can check that as root with "named -V" (or "named -v")
9.) inside a root konsole, you can run bind in the foreground with:
    named -g -u bind_user -d3  
    Note, that the running "bind_user" is distro dependent, some use "bind",
    others use "named". Please check that!
    When bind is starting with the '-d3' debug info, you'll get some info like this:

03-Jun-2013 14:38:43.370 Loading 'AD DNS Zone' using driver dlopen
03-Jun-2013 14:38:43.371 Loading SDLZ driver.
03-Jun-2013 14:38:47.233 samba_dlz: started for DN DC=intranet01,DC=hom
03-Jun-2013 14:38:47.234 SDLZ driver loaded successfully.
03-Jun-2013 14:38:47.234 DLZ driver loaded successfully.
03-Jun-2013 14:38:47.235 samba_dlz: starting configure
03-Jun-2013 14:38:47.275 zone 200.168.192.in-addr.arpa/NONE: number of nodes in database: 0
03-Jun-2013 14:38:47.278 zone 200.168.192.in-addr.arpa/NONE: loaded; checking validity
03-Jun-2013 14:38:47.281 zone_settimer: zone 200.168.192.in-addr.arpa/NONE: enter
03-Jun-2013 14:38:47.282 samba_dlz: configured writeable zone '200.168.192.in-addr.arpa'
03-Jun-2013 14:38:47.284 zone intranet01.hom/NONE: number of nodes in database: 0
03-Jun-2013 14:38:47.286 zone intranet01.hom/NONE: loaded; checking validity
03-Jun-2013 14:38:47.288 zone_settimer: zone intranet01.hom/NONE: enter
03-Jun-2013 14:38:47.289 samba_dlz: configured writeable zone 'intranet01.hom'
03-Jun-2013 14:38:47.291 zone _msdcs.intranet01.hom/NONE: number of nodes in database: 0
03-Jun-2013 14:38:47.294 zone _msdcs.intranet01.hom/NONE: loaded; checking validity
03-Jun-2013 14:38:47.296 zone_settimer: zone _msdcs.intranet01.hom/NONE: enter
03-Jun-2013 14:38:47.297 samba_dlz: configured writeable zone '_msdcs.intranet01.hom'

10.) start samba as usual. Inside that bind konsole you'll see a lot of debug infos...

Cheers, Günter

PS - sample bind configure.tmp for opensuse. This needs modifications for other distros!
(Note - with opensuse i do NOT use the chroot jail! - a different problem)

#!/bin/bash
export CFLAGS="-g -fomit-frame-pointer -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-
unwind-tables -fno-strict-aliasing"
export LDFLAGS="-L/usr/lib"

`dirname $0`/configure -C \
         --prefix=/usr \
         --bindir=/usr/bin \
	 --sbindir=/usr/sbin \
	 --sysconfdir=/etc \
	 --localstatedir=/var \
	 --libdir=/usr/lib \
	 --includedir=/usr/include/bind \
	 --mandir=/usr/share/man \
	 --infodir=/usr/share/info \
	 --with-openssl \
	 --enable-threads \
	 --with-libtool \
	 --with-libxml2 \
	 --with-gssapi \
	"$@"


More information about the samba mailing list