summaryrefslogtreecommitdiffstats
path: root/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'ldb')
-rw-r--r--ldb/Makefile.in6
-rw-r--r--ldb/common/ldb_modules.c6
-rw-r--r--ldb/configure.ac2
-rw-r--r--ldb/include/ldb_private.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/ldb/Makefile.in b/ldb/Makefile.in
index 3215acb5c..c8724df3a 100644
--- a/ldb/Makefile.in
+++ b/ldb/Makefile.in
@@ -24,6 +24,8 @@ PYTHON = @PYTHON@
PYTHON_CONFIG = @PYTHON_CONFIG@
ldbdir = $(srcdir)
+LDB_MODULESDIR = @LDB_MODULESDIR@
+
TALLOC_LIBS = @TALLOC_LIBS@
TALLOC_CFLAGS = @TALLOC_CFLAGS@
TALLOC_OBJ = @TALLOC_OBJ@
@@ -56,7 +58,9 @@ LIBS = @LIBS@
PICFLAG = @PICFLAG@
CFLAGS += -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \
$(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) $(EVENTS_CFLAGS) \
- -DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"$(SHLIBEXT)\" -DUSE_MMAP=1 @CFLAGS@
+ -DLIBDIR=\"$(libdir)\" -DSHLIBEXT=\"$(SHLIBEXT)\" -DUSE_MMAP=1 \
+ -DLDB_MODULESDIR=\"$(LDB_MODULESDIR)\" \
+ @CFLAGS@
MDLD = @MDLD@
MDLD_FLAGS = @MDLD_FLAGS@
diff --git a/ldb/common/ldb_modules.c b/ldb/common/ldb_modules.c
index 8db28d262..0fcdf937c 100644
--- a/ldb/common/ldb_modules.c
+++ b/ldb/common/ldb_modules.c
@@ -486,6 +486,12 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
} while (0)
+
+struct ldb_context *ldb_module_get_ctx(struct ldb_module *module)
+{
+ return module->ldb;
+}
+
/*
helper functions to call the next module in chain
*/
diff --git a/ldb/configure.ac b/ldb/configure.ac
index 095caa5e9..7bc081cfe 100644
--- a/ldb/configure.ac
+++ b/ldb/configure.ac
@@ -37,7 +37,7 @@ AC_PATH_PROG(SLAPD,slapd)
AC_CHECK_HEADERS(stdint.h dlfcn.h)
AC_CONFIG_HEADER(include/config.h)
-AC_DEFINE_UNQUOTED(LDB_MODULESDIR, LIBDIR "/ldb" , [Modules directory] )
+LDB_MODULESDIR="${libdir}/ldb"
AC_SUBST(LDB_MODULESDIR)
TESTS=""
diff --git a/ldb/include/ldb_private.h b/ldb/include/ldb_private.h
index c06528827..6120025d1 100644
--- a/ldb/include/ldb_private.h
+++ b/ldb/include/ldb_private.h
@@ -231,6 +231,8 @@ int ldb_sequence_number(struct ldb_context *ldb, enum ldb_sequence_type type, ui
/* The following definitions come from lib/ldb/common/ldb_modules.c */
+struct ldb_context *ldb_module_get_ctx(struct ldb_module *module);
+
const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string);
int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out);
int ldb_load_modules(struct ldb_context *ldb, const char *options[]);