diff options
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 637da4fcf2..081ee7e2ee 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -126,13 +126,22 @@ struct ldb_context *samdb_connect(TALLOC_CTX *mem_ctx, struct auth_session_info *session_info) { struct ldb_context *ldb; + struct dsdb_schema *schema; ldb = ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_sam_url(lp_ctx), session_info, samdb_credentials(ev_ctx, lp_ctx), 0); + if (!ldb) { return NULL; } + + schema = dsdb_get_schema(ldb, NULL); + /* make the resulting schema global */ + if (schema) { + dsdb_make_schema_global(ldb, schema); + } + return ldb; } |