diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-12-12 14:18:21 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2011-12-13 00:55:32 +1100 |
commit | 7f50890cd67fed69b049bde5328c4f662bab1806 (patch) | |
tree | f7433e75e3627321abe338389d3007d6b0b768d1 | |
parent | a648563cb732bd357c3d3eac1b5064293e2738ac (diff) | |
download | samba-7f50890cd67fed69b049bde5328c4f662bab1806.tar.gz samba-7f50890cd67fed69b049bde5328c4f662bab1806.tar.bz2 samba-7f50890cd67fed69b049bde5328c4f662bab1806.zip |
s4-param: Added bin_dir(),sbin_dir() methods to get compiled in dirs
-rw-r--r-- | source4/param/pyparam.c | 20 |
1 files changed, 17 insertions, 3 deletions
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 } }; |