pysecurity: use unsigned int, not int to approximate uint32_t
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sun, 7 Jul 2019 00:14:50 +0000 (12:14 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 22 Jul 2019 22:20:26 +0000 (22:20 +0000)
the "I" flag for unsigned int has been available since Python 2.3

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/pysecurity.c

index 38d502afb61f4c864a4ceb35ed497182168b90fe..fcef6007d54ad73e0e1d060ce52b66eb49df0368 100644 (file)
@@ -33,12 +33,12 @@ static PyObject *py_se_access_check(PyObject *module, PyObject *args, PyObject *
        PyObject *py_security_token = Py_None;
        struct security_descriptor *security_descriptor;
        struct security_token *security_token;
-       int access_desired; /* This is an int, because that's what
-                            * we need for the python
-                            * PyArg_ParseTupleAndKeywords */
+       unsigned int access_desired; /* This is an unsigned int, not uint32_t,
+                                     * because that's what we need for the
+                                     * python PyArg_ParseTupleAndKeywords */
        uint32_t access_granted;
 
-       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOi",
+       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOI",
                                         discard_const_p(char *, kwnames),
                                         &py_sec_desc, &py_security_token, &access_desired)) {
                return NULL;