DEBUG(0,("Provision for Become-DC test using python\n"));
Py_Initialize();
- py_update_path("bin"); /* FIXME: Can't assume this is always the case */
+ py_update_path(); /* Put the samba path at the start of sys.path */
provision_mod = provision_module();
if (settings->targetdir != NULL)
PyDict_SetItemString(parameters, "targetdir",
PyString_FromString(settings->targetdir));
- if (file_exist("setup/provision.smb.conf.dc")) {
- PyDict_SetItemString(parameters, "setup_dir",
- PyString_FromString("setup"));
- } else {
- PyDict_SetItemString(parameters, "setup_dir",
- PyString_FromString(dyn_SETUPDIR));
- }
PyDict_SetItemString(parameters, "hostname",
PyString_FromString(settings->netbios_name));
PyDict_SetItemString(parameters, "domain",
}
Py_Initialize();
- py_update_path("bin"); /* FIXME: Can't assume this is always the case */
+ py_update_path(); /* Put the samba path at the start of sys.path */
provision_mod = provision_module();
if (provision_mod == NULL) {
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;
- DEBUG(0,("Schema for DRS tests using python\n"));
-
Py_Initialize();
- py_update_path("bin"); /* FIXME: Can't assume this is always the case */
+ py_update_path(); /* Put the samba path at the start of sys.path */
schema_mod = schema_module();
parameters = PyDict_New();
- setupdir = lpcfg_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,