diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-20 01:30:36 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-20 01:30:36 +0100 |
commit | 5fe2b28f45289dc5578cdd536600f0d30a14d820 (patch) | |
tree | 4bdf36d0d4d8bdddcb3d618b4b01839370ed57c3 /source4/param | |
parent | ec9aeeab00584f4d3dfe9afb83dc1a77b8463b81 (diff) | |
parent | 3a4638db0351368d3b148bf547546f28fa0b1479 (diff) | |
download | samba-5fe2b28f45289dc5578cdd536600f0d30a14d820.tar.gz samba-5fe2b28f45289dc5578cdd536600f0d30a14d820.tar.bz2 samba-5fe2b28f45289dc5578cdd536600f0d30a14d820.zip |
Merge branch 'master' of git://git.samba.org/samba into minschema
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/provision.c | 8 | ||||
-rw-r--r-- | source4/param/util.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index 7a06f77d96..c8bff59deb 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -34,6 +34,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct provision_settings *settings, struct provision_result *result) { + char *configfile; PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters; DEBUG(0,("Provision for Become-DC test using python\n")); @@ -76,8 +77,11 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, settings->targetdir)); parameters = PyDict_New(); - PyDict_SetItemString(parameters, "smbconf", - PyString_FromString(lp_configfile(lp_ctx))); + configfile = lp_configfile(lp_ctx); + if (configfile != NULL) { + PyDict_SetItemString(parameters, "smbconf", + PyString_FromString(configfile)); + } PyDict_SetItemString(parameters, "rootdn", PyString_FromString(settings->root_dn_str)); diff --git a/source4/param/util.c b/source4/param/util.c index 92728d505a..3881107cbc 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -107,7 +107,7 @@ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, char *fname, *config_dir, *p; config_dir = talloc_strdup(mem_ctx, lp_configfile(lp_ctx)); if (config_dir == NULL) { - return NULL; + config_dir = talloc_strdup(mem_ctx, lp_default_path()); } p = strrchr(config_dir, '/'); if (p == NULL) { |