From 8b63ff52e2442d457b5221f51cb9e85e4b94e298 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2010 12:32:18 +1100 Subject: 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/include/ldb_module.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/ldb/include/ldb_module.h') diff --git a/source4/lib/ldb/include/ldb_module.h b/source4/lib/ldb/include/ldb_module.h index c1d668222f..dc6d19dee7 100644 --- a/source4/lib/ldb/include/ldb_module.h +++ b/source4/lib/ldb/include/ldb_module.h @@ -227,4 +227,7 @@ void ldb_req_mark_untrusted(struct ldb_request *req); */ bool ldb_req_is_untrusted(struct ldb_request *req); +/* load all modules from the given directory */ +int ldb_modules_load(const char *modules_path, const char *version); + #endif -- cgit