summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-20 01:37:53 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-20 01:37:53 +0100
commit71bc5acead0e16473273eb8741373e865b6d2c44 (patch)
tree800f83e622ac17bb60e01ce2034593b64c828c1a /source4/lib/ldb/common/ldb.c
parent15b86081cd2df734479fcaf92a482c7896bef605 (diff)
downloadsamba-71bc5acead0e16473273eb8741373e865b6d2c44.tar.gz
samba-71bc5acead0e16473273eb8741373e865b6d2c44.tar.bz2
samba-71bc5acead0e16473273eb8741373e865b6d2c44.zip
Allow ldb backends without init function, use init function-less ldb modules.
(This used to be commit 141ee91272fb4dafca0149f679e17721b6a3011e)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 87f791cb38..ffda705a0b 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -135,6 +135,15 @@ int ldb_connect_backend(struct ldb_context *ldb, const char *url, const char *op
}
}
+ if (fn == NULL) {
+ char *symbol_name = talloc_asprintf(ldb, "ldb_%s_connect", backend);
+ if (symbol_name == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+ fn = ldb_dso_load_symbol(ldb, backend, symbol_name);
+ talloc_free(symbol_name);
+ }
+
talloc_free(backend);
if (fn == NULL) {