From 798b05a9740f43b2b6f9a5091878d85e3c88409d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Oct 2009 20:30:53 +1100 Subject: s4-dsdb: call dsdb_make_schema_global() from ldb_wrap Calling it from samdb_connect() can cause a stale schema to be put into the global schema. Thanks to Andrew Bartlett for spotting this. --- source4/lib/ldb_wrap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index ecd7bf4554..134c2271fd 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -248,6 +248,11 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx, DLIST_ADD(ldb_wrap_list, w); + /* make the resulting schema global */ + if (lp_ctx != NULL && strcmp(lp_sam_url(lp_ctx), url) == 0) { + dsdb_make_schema_global(ldb); + } + DEBUG(3,("ldb_wrap open of %s\n", url)); talloc_set_destructor(w, ldb_wrap_destructor); -- cgit