[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:39:35 BST 2022
11.04.2022 12:29, Michael Tokarev wrote:
..
> 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? :)
And yes it works: samba programs do use all these plugins
with old (before-ldb-merge) samba package. So apparently
ldb performs the recursive modules load thing... or samba
is using some trick in there, I dunno...
I tried to run a random ldb util, it was ldbsearch, and
straced it, - apparently it readdir($modulesdir) for
each path (in $LDB_MODULES_DIR too), and performs an
recursive load of everything found in there! So it is
not just a specific module which it loads, but *all*
of them, no matter if they're needed or not. That's
why all samba processes have them *all* open. Wow!..
This is another quite.. unexpected thing to me to
find.. ;)
/mjt
More information about the Pkg-samba-maint
mailing list