summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index f8162aee8c..ee70a639fa 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -94,7 +94,7 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
char *modstr, *c, *p;
ret = ldb_search(ldb, "", LDB_SCOPE_BASE, "dn=@MODULES", attrs, &msg);
- if (ret == 0) {
+ if (ret == 0 || (ret == 1 && msg[0]->num_elements == 0)) {
ldb_debug(ldb, LDB_DEBUG_TRACE, "no modules required by the db\n");
} else {
if (ret < 0) {
@@ -184,6 +184,7 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
continue;
}
+#ifdef _SAMBA_BUILD_
if (strcmp(modules[i], "samldb") == 0) {
current = samldb_module_init(ldb, options);
if (!current) {
@@ -193,6 +194,7 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
DLIST_ADD(ldb->modules, current);
continue;
}
+#endif
#ifdef HAVE_DLOPEN_DISABLED
filename = talloc_asprintf(ldb, "%s.so", modules[i]);