diff options
Diffstat (limited to 'source4/lib/ldb_wrap.c')
-rw-r--r-- | source4/lib/ldb_wrap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index d5178467b1..8bcfb58f61 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -250,7 +250,10 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx, /* make the resulting schema global */ if (lp_ctx != NULL && strcmp(lp_sam_url(lp_ctx), url) == 0) { - dsdb_make_schema_global(ldb); + struct dsdb_schema *schema = dsdb_get_schema(ldb, NULL); + if (schema) { + dsdb_make_schema_global(ldb, schema); + } } DEBUG(3,("ldb_wrap open of %s\n", url)); |