From 67905b41a97fb7c0a7f4c7070e837f1fcb8bfbb4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Apr 2011 12:47:11 +1000 Subject: s4-param Rename private_path() -> lpcfg_private_path() This is consistent with lock_path() Andrew Bartlett --- source4/param/pyparam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/param/pyparam.c') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 3ba81468605..043d8261d47 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -229,7 +229,7 @@ static PyObject *py_lp_ctx_private_path(py_talloc_Object *self, PyObject *args) if (!PyArg_ParseTuple(args, "s", &name)) return NULL; - path = private_path(NULL, PyLoadparmContext_AsLoadparmContext(self), name); + path = lpcfg_private_path(NULL, PyLoadparmContext_AsLoadparmContext(self), name); ret = PyString_FromString(path); talloc_free(path); -- cgit From c091a92be51e8c14bf0b51ab83319fbcb704c91f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 2 Jun 2011 15:43:40 +1000 Subject: s4-param Remove 'sam database' parameter This now just relies on the private dir parameter, which remains. Andrew Bartlett --- source4/param/pyparam.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/param/pyparam.c') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 043d8261d47..998eb9d325b 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -272,6 +272,12 @@ static PyObject *py_lp_dump(PyObject *self, PyObject *args) Py_RETURN_NONE; } +static PyObject *py_samdb_url(PyObject *self) +{ + struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self); + return PyString_FromFormat("tdb://%s/sam.ldb", lpcfg_private_dir(lp_ctx)); +} + static PyMethodDef py_lp_ctx_methods[] = { { "load", (PyCFunction)py_lp_ctx_load, METH_VARARGS, @@ -298,6 +304,9 @@ static PyMethodDef py_lp_ctx_methods[] = { "S.services() -> list" }, { "dump", (PyCFunction)py_lp_dump, METH_VARARGS, "S.dump(stream, show_defaults=False)" }, + { "samdb_url", (PyCFunction)py_samdb_url, METH_NOARGS, + "S.samdb_url() -> string\n" + "Returns the current URL for sam.ldb." }, { NULL } }; -- cgit From f67a14976bd6ccdacd319df872e6add994f0e0f3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 6 Jun 2011 14:39:19 +1000 Subject: s4-param Remove 'modules dir' The Samba waf build ensures that dyn_MODULESDIR is always correct (even for in-tree binaries), so we don't need to allow the user to configure this at run time. Andrew Bartlett --- source4/param/pyparam.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/param/pyparam.c') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 998eb9d325b..e1ba18415d3 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -440,11 +440,18 @@ static PyObject *py_setup_dir(PyObject *self) return PyString_FromString(dyn_SETUPDIR); } +static PyObject *py_modules_dir(PyObject *self) +{ + return PyString_FromString(dyn_MODULESDIR); +} + 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." }, + { "modules_dir", (PyCFunction)py_modules_dir, METH_NOARGS, + "Returns the compiled in location of modules." }, { NULL } }; -- cgit