s4-param Remove unused 'announce version'
[samba.git] / source4 / param / provision.c
index f1ef695ac0e1cb43987d971e1d57549ac048f005..7b6e6e74b3511329122c5d908800d949a3e57288 100644 (file)
@@ -84,7 +84,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
        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();
 
@@ -131,13 +131,6 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
        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", 
@@ -247,7 +240,7 @@ NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context
        }
 
        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) {
@@ -340,13 +333,10 @@ failure:
 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();
 
@@ -372,9 +362,6 @@ struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_co
        
        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,