diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/provision.c | 8 | ||||
-rw-r--r-- | source4/param/provision.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index 28869e0a72..81c4fb16a5 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -339,7 +339,8 @@ failure: } -struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, + DATA_BLOB *override_prefixmap) { const char *setupdir; PyObject *schema_mod, *schema_dict, *schema_fn, *py_result, *parameters; @@ -376,6 +377,11 @@ struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_co setupdir = lp_setupdir(lp_ctx); PyDict_SetItemString(parameters, "setup_dir", PyString_FromString(setupdir)); + if (override_prefixmap) { + PyDict_SetItemString(parameters, "override_prefixmap", + PyString_FromStringAndSize((const char *)override_prefixmap->data, + override_prefixmap->length)); + } py_result = PyEval_CallObjectWithKeywords(schema_fn, NULL, parameters); diff --git a/source4/param/provision.h b/source4/param/provision.h index 516a9dea5f..36758b9707 100644 --- a/source4/param/provision.h +++ b/source4/param/provision.h @@ -63,6 +63,7 @@ NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context struct provision_store_self_join_settings *settings, const char **error_string); -struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx); +struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, + DATA_BLOB *override_prefixmap); #endif /* _PROVISION_H_ */ |