Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30368/win32/src
Modified Files:
win32security.i
Log Message:
Add MapGenericMask
Index: win32security.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** win32security.i 20 Sep 2005 12:41:31 -0000 1.29
--- win32security.i 12 Feb 2006 09:47:43 -0000 1.30
***************
*** 3517,3520 ****
--- 3517,3541 ----
%}
+ // @pyswig int|MapGenericMask|Translates generic access rights into specific rights
+ %native(MapGenericMask) PyMapGenericMask;
+ %{
+ static PyObject *PyMapGenericMask(PyObject *self, PyObject *args)
+ {
+ DWORD mask;
+ GENERIC_MAPPING mapping;
+ // @rdesc The input AccessMask will be returned with any generic access rights translated into specific equivalents
+ // @pyparm int|AccessMask||A bitmask of generic rights to be interpreted according to GenericMapping
+ // @pyparm (int,int,int,int)|GenericMapping||A tuple of 4 bitmasks (GenericRead, GenericWrite, GenericExecute, GenericAll)
+ // containing the standard and specific rights that correspond to the generic rights.
+ if (!PyArg_ParseTuple(args,"k(kkkk)", &mask, &mapping.GenericRead, &mapping.GenericWrite,
+ &mapping.GenericExecute, &mapping.GenericAll))
+ return NULL;
+ Py_BEGIN_ALLOW_THREADS
+ MapGenericMask(&mask, &mapping);
+ Py_END_ALLOW_THREADS
+ return PyLong_FromUnsignedLong(mask);
+ }
+ %}
+
#define TOKEN_ADJUST_DEFAULT TOKEN_ADJUST_DEFAULT // Required to change the default ACL, primary group, or owner of an access token.
#define TOKEN_ADJUST_GROUPS TOKEN_ADJUST_GROUPS // Required to change the groups specified in an access token.
|