[Samba] Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain

Kristján Valur Jónsson kristjan at rvx.is
Tue Jan 30 12:54:23 UTC 2018

No, I'm reading the dlz_bind9.c code.
I've found and fixed the problem.  It turns out that using a reference
counted singleton is a bad idea.  The singleton is defunct after reload.
If we simply create a new state object and destroy the old one as bind is
trying to let us do, things work out fine.
This works, at least, for bind9.9.  I cant test with the older (9.8), so it
is possible that the singleton approach was necessary for that.
Expect a pull request from me soon.

On 30 January 2018 at 11:55, Rowland Penny via samba <samba at lists.samba.org>

> On Tue, 30 Jan 2018 11:24:42 +0000
> Kristján Valur Jónsson <kristjan at rvx.is> wrote:
> > Right, that is the _workaround_.  It'd be great to see that
> > documented in the Wiki.
> It is now.
> > However, samba_dlz is supposed to support reload, and there has been
> > work on that file to fix slow reload previously.
> > I"m currently doing experiments to figure out what is going wrong.
> >
> > One thing is clear, the messages from samba_dlz is confusing, since
> > it is actually not "shutting down".
> > Rather, samba_dlz, maintains a reference counted singleton of its
> > state. What happens during reload is:
> > 1) dlz_create is called.  The refcount is upped, same internal
> > instance returned to named and* nothing is logged.*
> > 2) dlz_configure() is called.
> > 3) dlz_destroy() is called.  The refcount is decreased (from 2 to 1),
> > nothing is destroyed, *but it incorrectly logs that it is shutting
> > down!*
> >
> > Clearly, bind expects to start a new instance of its dlz, initialize
> > it, and then destroy the old instance.
> >
> Still not sure where the problem lies, if you are only reading the Bind
> source code, then the problem is a Bind one, but if you are also
> reading the Samba code, then it could be a Samba one.
> Rowland
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

Kristján Valur Jónsson, RVX

More information about the samba mailing list