[Pkg-samba-maint] ldb modules dir and <ldb.h> placement: is ldb samba-specific or not?

Michael Tokarev mjt at tls.msk.ru
Mon Apr 11 10:29:38 BST 2022


ummmm.. :)

Andrew, there's nothing to apologize about for a start,
it is very good some discussion is going, and unclear
things gets questioned and points of possible issues
are raised, definitely good.

I didn't know the broken/ugly thing which was in debian
when ldb was built separately was the one which needed
to be preserved - namely, I didn't know the ldb module
thing is something which can be used by a 3rd party
program (like sssd).  Just didn't know. I thought it
is internal to ldb first, next I found dsdb modules and
thought it is the only thing in there. And thought also
that now, since the two (ldb and dsdb mods) are being
in one subdir and there's no need anymore to do the
symlink hackery - that will be a good thing to have, -
instead of replicating the mess which was there with
external ldb, especially since it required quite some
dirty hacks in wscripts too, to separate dsdb modules
dir out of ldb modules dir (in samba the two uses the
same config variable). Re-creating the mess which
previously was there seemed to be just insane, esp.
having the amount of new dirty mess it required to
be done :)

Didn't know up until 2 days ago when we finally managed
to find out why sssd was failing (it was due to it being
unable to initialize ldb with its own module).  Didn't
know ldb plugings can *ever* be provided by external
software.  And I broke that software already, now they
adopted to the new ldbmodsdir being $libdir/samba/ldb
now (so I've added breaks: older sssd to our libldb2).

Now the question really is: where should ldb modules go?
Basically, should it be $libdir/samba/ldb/ or $libdir/ldb/ ?
(not the initially-wrong $libdir/ldb/modules/ldb/).

And a second, related, question: where samba-dsdb-modules
should be placed? Should it be the same directory as
ldb modules (so that installing samba-dsdb-modules automatically
makes them available for all ldb users), or should it be
separate, and samba-dsdb-modules should tweak
$LDB_MODULES_PATH internally? If there's anything in
there that might be an issue with licensing, that's
okay too, it should be at least considered. I just don't
know if there's an issue or not to have [L]GPL3 plugins
available for all users of ldb or not.

If ldb is tied to samba, $libdir/samba/ldb/ should be okay.
If ldb is separate, it should be $libdir/ldb/. And if
GPLv3 is a concern, dsdb modules should be separate (with
a way for samba to specify extra $LDB_MODULES_PATH dir).

I don't even know how samba-dsdb-modules worked before
the merge. Before-ldb-merge samba-dsdb-modules  shipped
a symlink, $libdir/ldb/modules/ldb/samba, pointing to
../../../samba/ldb (to where samba ldb modules are installed).
If ldb searches their modules recursively it should work.
If not and it uses regular path-search, it wont, since
samba-supplied modules would be like samba/wins_ldb.so,
not just wins_ldb.so.  Did these _ever_ work? :)

/mjt



More information about the Pkg-samba-maint mailing list