summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-08-01 15:35:32 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-03 14:25:50 +1000
commit463ab48868e917b1ccad22bfb5c3c101b6c44e7b (patch)
tree3f698ccc719a90a6d3bf798c9f4f47dd5bfdb68d /source4/lib
parent0c8d74299234b50c8705d7700da325146cf9a5fe (diff)
downloadsamba-463ab48868e917b1ccad22bfb5c3c101b6c44e7b.tar.gz
samba-463ab48868e917b1ccad22bfb5c3c101b6c44e7b.tar.bz2
samba-463ab48868e917b1ccad22bfb5c3c101b6c44e7b.zip
s4-policy: Add python wrapper for ads_to_dir_access_mask() function
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/policy/pypolicy.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source4/lib/policy/pypolicy.c b/source4/lib/policy/pypolicy.c
index 3f302e6764..8a9aa47f1f 100644
--- a/source4/lib/policy/pypolicy.c
+++ b/source4/lib/policy/pypolicy.c
@@ -108,11 +108,26 @@ static PyObject *py_get_gplink_options(PyObject *self, PyObject *args)
return py_ret;
}
+static PyObject *py_ads_to_dir_access_mask(PyObject *self, PyObject *args)
+{
+ uint32_t access_mask, dir_mask;
+
+ if (! PyArg_ParseTuple(args, "I", &access_mask))
+ return NULL;
+
+ dir_mask = gp_ads_to_dir_access_mask(access_mask);
+
+ return Py_BuildValue("I", dir_mask);
+}
+
+
static PyMethodDef py_policy_methods[] = {
{ "get_gpo_flags", (PyCFunction)py_get_gpo_flags, METH_VARARGS,
"get_gpo_flags(flags) -> list" },
- { "get_gplink_options", (PyCFunction)py_get_gplink_options, METH_VARARGS,
- "get_gplink_options(options) -> list" },
+ { "get_gplink_options", (PyCFunction)py_get_gplink_options, METH_VARARGS,
+ "get_gplink_options(options) -> list" },
+ { "ads_to_dir_access_mask", (PyCFunction)py_ads_to_dir_access_mask, METH_VARARGS,
+ "ads_to_dir_access_mask(access_mask) -> dir_mask" },
{ NULL }
};