s4-ldb: support a new type of ldb module loading
authorAndrew Tridgell <tridge@samba.org>
Mon, 1 Nov 2010 01:32:18 +0000 (12:32 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 1 Nov 2010 07:55:18 +0000 (18:55 +1100)
commit8b63ff52e2442d457b5221f51cb9e85e4b94e298
tree582abea1338458934880dab68bcececbcd371e10
parentfd6d29bc08cacbd5270599aab52e0006bea2002f
s4-ldb: support a new type of ldb module loading

this supports module loading in ldb which uses the approach of "load
all modules in a directory". This is much more flexible than the
current module loading, as it will allow us to load modules for
command line parsing and authentication.

Modules are loaded from a colon separated path, in the environment
variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR.

Within each directory modules are loaded recursively (traversing down
the directory tree). The device/inode number of each module is
remembered to prevent us loading a module twice.

Each module is checked for a ldb_init_module() function with
dlsym(). If found, it is called with the ldb module version as an
argument.
source4/lib/ldb/common/ldb.c
source4/lib/ldb/common/ldb_modules.c
source4/lib/ldb/include/ldb_module.h
source4/lib/ldb/wscript