diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/provision.c | 4 | ||||
-rw-r--r-- | source4/param/pyparam.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index c5db6ec8aa3..e4236a59c5a 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -131,8 +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)); - PyDict_SetItemString(parameters, "setup_dir", - PyString_FromString(dyn_SETUPDIR)); PyDict_SetItemString(parameters, "hostname", PyString_FromString(settings->netbios_name)); PyDict_SetItemString(parameters, "domain", @@ -364,8 +362,6 @@ struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_co parameters = PyDict_New(); - PyDict_SetItemString(parameters, "setup_dir", - PyString_FromString(dyn_SETUPDIR)); if (override_prefixmap) { PyDict_SetItemString(parameters, "override_prefixmap", PyString_FromStringAndSize((const char *)override_prefixmap->data, diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index fb7ff88cfc2..bf4d1d0cbc4 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -22,6 +22,7 @@ #include "param/param.h" #include "param/loadparm.h" #include "lib/talloc/pytalloc.h" +#include "dynconfig/dynconfig.h" /* There's no Py_ssize_t in 2.4, apparently */ #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 @@ -419,9 +420,16 @@ static PyObject *py_default_path(PyObject *self) return PyString_FromString(lp_default_path()); } +static PyObject *py_setup_dir(PyObject *self) +{ + return PyString_FromString(dyn_SETUPDIR); +} + static PyMethodDef pyparam_methods[] = { { "default_path", (PyCFunction)py_default_path, METH_NOARGS, "Returns the default smb.conf path." }, + { "setup_dir", (PyCFunction)py_setup_dir, METH_NOARGS, + "Returns the compiled in location of provision tempates." }, { NULL } }; |