diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-11 00:43:23 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-11 00:43:23 +0200 |
commit | 8ed6f6d5a825c8b0e8d66d30877a91a96fe6e7a4 (patch) | |
tree | d63835e2a12772fe837825cb78c4159c6b44fd6f /source4/param | |
parent | 574bf79f3bdaff50f902cb68d456c4672f3092be (diff) | |
download | samba-8ed6f6d5a825c8b0e8d66d30877a91a96fe6e7a4.tar.gz samba-8ed6f6d5a825c8b0e8d66d30877a91a96fe6e7a4.tar.bz2 samba-8ed6f6d5a825c8b0e8d66d30877a91a96fe6e7a4.zip |
Return SAM ldb context and loadparm context as part of C provision
result.
(This used to be commit a3e1b835656470f1a80f0fa69f53a9df849baee3)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/provision.c | 7 | ||||
-rw-r--r-- | source4/param/provision.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index 41b062883c..e55d984e55 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -32,6 +32,8 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct provision_settings *settings, struct provision_result *result) { + extern struct loadparm_context *lp_from_py_object(PyObject *py_obj); + struct ldb_context *ldb_context_from_py_object(PyObject *py_obj); PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters; DEBUG(0,("Provision for Become-DC test using python\n")); @@ -128,5 +130,10 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, result->domaindn = talloc_strdup(mem_ctx, PyString_AsString(PyObject_GetAttrString(py_result, "domaindn"))); + /* FIXME paths */ + /* FIXME samdb */ + result->lp_ctx = lp_from_py_object(PyObject_GetAttrString(py_result, "lp")); + result->samdb = ldb_context_from_py_object(PyObject_GetAttrString(py_result, "samdb")); + return NT_STATUS_OK; } diff --git a/source4/param/provision.h b/source4/param/provision.h index e739053d50..6b5bc798df 100644 --- a/source4/param/provision.h +++ b/source4/param/provision.h @@ -42,6 +42,8 @@ struct provision_settings { /* FIXME: Rename this to hostconfig ? */ struct provision_result { const char *domaindn; + struct ldb_context *samdb; + struct loadparm_context *lp_ctx; }; NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, |