summaryrefslogtreecommitdiff
path: root/ldb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-28 08:43:12 -0500
committerSimo Sorce <idra@samba.org>2009-01-28 08:43:12 -0500
commit11e7110cee5c95bebe5f746287e7792e88cf6e83 (patch)
tree1cb140fbafd45c948868d048fd3b01539e2026d8 /ldb
parentebd7edeba105768909aba02ceee922b3c6708581 (diff)
downloadsssd-11e7110cee5c95bebe5f746287e7792e88cf6e83.tar.gz
sssd-11e7110cee5c95bebe5f746287e7792e88cf6e83.tar.bz2
sssd-11e7110cee5c95bebe5f746287e7792e88cf6e83.zip
Add a memberof plugin so that we can properly apply the same group memberships
as in IPA if necessary. This patch slightly modifies ldb to split out a modules header file without exposing the private headers.
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 3215acb5..c8724df3 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 8db28d26..0fcdf937 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 095caa5e..7bc081cf 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 c0652882..6120025d 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[]);