From 7f50890cd67fed69b049bde5328c4f662bab1806 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 12 Dec 2011 14:18:21 +1100 Subject: s4-param: Added bin_dir(),sbin_dir() methods to get compiled in dirs --- source4/param/pyparam.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source4/param') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index e7eb43f28e..4d246a7d8a 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -451,17 +451,27 @@ PyTypeObject PyLoadparmService = { static PyObject *py_default_path(PyObject *self) { - return PyString_FromString(lp_default_path()); + return PyString_FromString(lp_default_path()); } static PyObject *py_setup_dir(PyObject *self) { - return PyString_FromString(dyn_SETUPDIR); + return PyString_FromString(dyn_SETUPDIR); } static PyObject *py_modules_dir(PyObject *self) { - return PyString_FromString(dyn_MODULESDIR); + return PyString_FromString(dyn_MODULESDIR); +} + +static PyObject *py_bin_dir(PyObject *self) +{ + return PyString_FromString(dyn_BINDIR); +} + +static PyObject *py_sbin_dir(PyObject *self) +{ + return PyString_FromString(dyn_SBINDIR); } static PyMethodDef pyparam_methods[] = { @@ -471,6 +481,10 @@ static PyMethodDef pyparam_methods[] = { "Returns the compiled in location of provision tempates." }, { "modules_dir", (PyCFunction)py_modules_dir, METH_NOARGS, "Returns the compiled in location of modules." }, + { "bin_dir", (PyCFunction)py_bin_dir, METH_NOARGS, + "Returns the compiled in BINDIR." }, + { "sbin_dir", (PyCFunction)py_sbin_dir, METH_NOARGS, + "Returns the compiled in SBINDIR." }, { NULL } }; -- cgit