summaryrefslogtreecommitdiff
path: root/source4/lib/db_wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/db_wrap.c')
-rw-r--r--source4/lib/db_wrap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c
index f884140d1c..e7d3388f72 100644
--- a/source4/lib/db_wrap.c
+++ b/source4/lib/db_wrap.c
@@ -35,6 +35,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb/samba/ldif_handlers.h"
#include "db_wrap.h"
+#include "dsdb/samdb/samdb.h"
static struct tdb_wrap *tdb_list;
@@ -126,6 +127,10 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
talloc_free(ldb);
return NULL;
}
+
+ if (strcmp(lp_sam_url(), url) == 0) {
+ dsdb_set_global_schema(ldb);
+ }
ret = ldb_register_samba_handlers(ldb);
if (ret == -1) {