samba4: bind error #define DLZ_DLOPEN_VERSION 1
Günter Kukkukk
linux at kukkukk.com
Thu Apr 19 08:26:30 MDT 2012
On Thursday 19 April 2012 12:36:35 Kev Latimer wrote:
> On 19/04/2012 10:32, steve wrote:
> > On 19/04/12 10:39, Kev Latimer wrote:
> >> On 19/04/2012 09:38, Kev Latimer wrote:
> >>> On 18/04/2012 16:04, Amitay Isaacs wrote:
> >>>> Hi Steve,
> >>>>
> >>>> On Wed, Apr 18, 2012 at 11:34 PM, steve<steve at steve-ss.com> wrote:
> >>>>> 4.0.0alpha20-GIT-c69c07e openSUSE 12.1 bind 9.8
> >>>>>
> >>>>> Hi. A strange problem with bind not starting after overwriting a
> >>>>> git from 2
> >>>>> weeks ago. Something like 'should be version 1 not version 2'
> >>>>>
> >>>>> It seems to default to the new bind unless we add:
> >>>>> #define BIND_VERSION_9_8 1
> >>>>> to:
> >>>>> source4/dns_server/dlz_minimal.h
> >>>>>
> >>>>> to get this bit right:
> >>>>> #ifdef BIND_VERSION_9_8
> >>>>> #define DLZ_DLOPEN_VERSION 1
> >>>>> #else
> >>>>> #define DLZ_DLOPEN_VERSION 2
> >>>>> #endif
> >>>
> >>> This is BIND 9.8.1-P1, same BIND as I've been using throughout.
> >>>
> >>> My C isn't good enough to figure out why it isn't making two files,
> >>> I'm afraid :-P
> >
> > Hi
> > Me neither but I see it as:
> >
> > if BIND_VERSION_9_8 is defined somewhere (I defined it before hitting
> > that bit of the header, in the same file) then it will build the so
> > for 9.8. Otherwise it will build the so for 9.9. Because it's an
> > if-else it does one thing or the other. If you don't have 9.8, it does
> > the other.
> >
> > Should there be 2 files or just one?
> >
> > Cheers,
> > Steve
>
> According to Amitay, it should build two files, dlz_bind9.so for 9.8 and
> dlz_bind9_9.so for 9.9; for us, it just seems to build a single file,
> dlz_bind9.so, which only works on 9.9...
>
> I used the same trick as you did to build a 9.8 module and I'm back up
> and running.
>
> The only thing I can think of is that we upgraded our Samba's to reach
> this problem, no fresh install. Think I'll quickly build it on a
> different machine and see if a new install makes a difference on the
> modules it builds?
when you use the latest git master tree, you should get 2 dynlink modules.
Amitay also modified /source4/dns_server/wscript_build:
....
....
# a bind9 dlz module giving access to the Samba DNS SAM
bld.SAMBA_LIBRARY('dlz_bind9',
source='dlz_bind9.c',
cflags='-DBIND_VERSION_9_8',
private_library=True,
link_name='modules/bind9/dlz_bind9.so',
realname='dlz_bind9.so',
install_path='${MODULESDIR}/bind9',
deps='samba-hostconfig samdb gensec popt')
bld.SAMBA_LIBRARY('dlz_bind9_9',
source='dlz_bind9.c',
cflags='-DBIND_VERSION_9_9',
private_library=True,
link_name='modules/bind9/dlz_bind9_9.so',
realname='dlz_bind9.so',
install_path='${MODULESDIR}/bind9',
deps='samba-hostconfig samdb gensec popt')
---------------
During a new provision step (when defining --dns-backend=BIND9_DLZ),
a new s4 named.conf (include file) is generated:
#
# This configures dynamically loadable zones (DLZ) from AD schema
# Uncomment only single database line, depending on your BIND version
#
dlz "AD DNS Zone" {
# For BIND 9.8.0
database "dlopen ${MODULESDIR}/bind9/dlz_bind9.so";
# For BIND 9.9.0
# database "dlopen ${MODULESDIR}/bind9/dlz_bind9_9.so";
};
So the user needs to specify the used bind version here then by
commenting/uncommenting some lines.
Cheers, Günter
More information about the samba-technical
mailing list