summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c3
-rw-r--r--source4/dsdb/schema/schema_init.c9
-rw-r--r--source4/scripting/python/samba/provision.py2
3 files changed, 13 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 97491a2ae3..ebc90d4cf3 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -263,9 +263,10 @@ static int rootdse_search(struct ldb_module *module, struct ldb_request *req)
struct ldb_request *down_req;
int ret;
- /* see if its for the rootDSE */
+ /* see if its for the rootDSE - only a base search on the "" DN qualifies */
if (req->op.search.scope != LDB_SCOPE_BASE ||
( ! ldb_dn_is_null(req->op.search.base))) {
+ /* Otherwise, pass down to the rest of the stack */
return ldb_next_request(module, req);
}
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 2ec5ad34b1..706c8e24d2 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -1755,6 +1755,11 @@ int dsdb_set_global_schema(struct ldb_context *ldb)
return ret;
}
+ /* Keep a reference to this schema, just incase the global copy is replaced */
+ if (talloc_reference(ldb, global_schema) == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
return LDB_SUCCESS;
}
@@ -1792,6 +1797,10 @@ void dsdb_make_schema_global(struct ldb_context *ldb)
return;
}
+ if (global_schema) {
+ talloc_unlink(talloc_autofree_context(), schema);
+ }
+
talloc_steal(talloc_autofree_context(), schema);
global_schema = schema;
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 4b310381ef..0119f40c7f 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -504,6 +504,8 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info,
backend_modules = ["normalise", "entryuuid", "paged_searches"]
# OpenLDAP handles subtree renames, so we don't want to do any of these things
tdb_modules_list = None
+ elif ldap_backend is not None:
+ raise "LDAP Backend specified, but LDAP Backend Type not specified"
elif serverrole == "domain controller":
backend_modules = ["repl_meta_data"]
else: