diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-23 20:56:41 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-24 01:51:04 -0600 |
commit | d0ba9f001474bfee9b1e8fb516effab736cd4050 (patch) | |
tree | 1f4f21c4cf230e2438b1a9fac46eab7e7714b5e6 /source4/libcli | |
parent | 3ee442c54f658e0dc9541a492e46fd8f6bf3a7f4 (diff) | |
download | samba-d0ba9f001474bfee9b1e8fb516effab736cd4050.tar.gz samba-d0ba9f001474bfee9b1e8fb516effab736cd4050.tar.bz2 samba-d0ba9f001474bfee9b1e8fb516effab736cd4050.zip |
r26572: Fix warnings in the Python code.
(This used to be commit 15038d9586d0b58f301ca8c39c21ef10c4283f28)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/security/security.i | 4 | ||||
-rw-r--r-- | source4/libcli/security/security_descriptor.c | 6 | ||||
-rw-r--r-- | source4/libcli/security/security_wrap.c | 32 | ||||
-rw-r--r-- | source4/libcli/util/errors.i | 4 |
4 files changed, 23 insertions, 23 deletions
diff --git a/source4/libcli/security/security.i b/source4/libcli/security/security.i index 7e48251e51..647c9aea09 100644 --- a/source4/libcli/security/security.i +++ b/source4/libcli/security/security.i @@ -83,8 +83,8 @@ typedef struct security_descriptor { security_descriptor(TALLOC_CTX *mem_ctx) { return security_descriptor_initialise(mem_ctx); } NTSTATUS sacl_add(const struct security_ace *ace); NTSTATUS dacl_add(const struct security_ace *ace); - NTSTATUS dacl_del(const struct security_ace *ace); - NTSTATUS sacl_del(const struct security_ace *ace); + NTSTATUS dacl_del(const struct dom_sid *trustee); + NTSTATUS sacl_del(const struct dom_sid *trustee); #ifdef SWIGPYTHON %rename(__eq__) equal; #endif diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c index 6a124d7371..882284dd9b 100644 --- a/source4/libcli/security/security_descriptor.c +++ b/source4/libcli/security/security_descriptor.c @@ -235,7 +235,7 @@ NTSTATUS security_descriptor_dacl_add(struct security_descriptor *sd, static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd, bool sacl_del, - struct dom_sid *trustee) + const struct dom_sid *trustee) { int i; bool found = false; @@ -292,7 +292,7 @@ static NTSTATUS security_descriptor_acl_del(struct security_descriptor *sd, */ NTSTATUS security_descriptor_dacl_del(struct security_descriptor *sd, - struct dom_sid *trustee) + const struct dom_sid *trustee) { return security_descriptor_acl_del(sd, false, trustee); } @@ -303,7 +303,7 @@ NTSTATUS security_descriptor_dacl_del(struct security_descriptor *sd, */ NTSTATUS security_descriptor_sacl_del(struct security_descriptor *sd, - struct dom_sid *trustee) + const struct dom_sid *trustee) { return security_descriptor_acl_del(sd, true, trustee); } diff --git a/source4/libcli/security/security_wrap.c b/source4/libcli/security/security_wrap.c index 58bfd19bec..72118b2359 100644 --- a/source4/libcli/security/security_wrap.c +++ b/source4/libcli/security/security_wrap.c @@ -3116,7 +3116,7 @@ SWIGINTERN PyObject *_wrap_security_descriptor_sacl_add(PyObject *SWIGUNUSEDPARM arg2 = (struct security_ace *)(argp2); result = security_descriptor_sacl_add(arg1,(struct security_ace const *)arg2); if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, nt_errstr(result)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if (resultobj == NULL) { @@ -3156,7 +3156,7 @@ SWIGINTERN PyObject *_wrap_security_descriptor_dacl_add(PyObject *SWIGUNUSEDPARM arg2 = (struct security_ace *)(argp2); result = security_descriptor_dacl_add(arg1,(struct security_ace const *)arg2); if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, nt_errstr(result)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if (resultobj == NULL) { @@ -3171,7 +3171,7 @@ fail: SWIGINTERN PyObject *_wrap_security_descriptor_dacl_del(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; security_descriptor *arg1 = (security_descriptor *) 0 ; - struct security_ace *arg2 = (struct security_ace *) 0 ; + struct dom_sid *arg2 = (struct dom_sid *) 0 ; NTSTATUS result; void *argp1 = 0 ; int res1 = 0 ; @@ -3180,7 +3180,7 @@ SWIGINTERN PyObject *_wrap_security_descriptor_dacl_del(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "ace", NULL + (char *) "self",(char *) "trustee", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:security_descriptor_dacl_del",kwnames,&obj0,&obj1)) SWIG_fail; @@ -3189,14 +3189,14 @@ SWIGINTERN PyObject *_wrap_security_descriptor_dacl_del(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_descriptor_dacl_del" "', argument " "1"" of type '" "security_descriptor *""'"); } arg1 = (security_descriptor *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_ace, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_dom_sid, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_descriptor_dacl_del" "', argument " "2"" of type '" "struct security_ace const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_descriptor_dacl_del" "', argument " "2"" of type '" "struct dom_sid const *""'"); } - arg2 = (struct security_ace *)(argp2); - result = security_descriptor_dacl_del(arg1,(struct security_ace const *)arg2); + arg2 = (struct dom_sid *)(argp2); + result = security_descriptor_dacl_del(arg1,(struct dom_sid const *)arg2); if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, nt_errstr(result)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if (resultobj == NULL) { @@ -3211,7 +3211,7 @@ fail: SWIGINTERN PyObject *_wrap_security_descriptor_sacl_del(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; security_descriptor *arg1 = (security_descriptor *) 0 ; - struct security_ace *arg2 = (struct security_ace *) 0 ; + struct dom_sid *arg2 = (struct dom_sid *) 0 ; NTSTATUS result; void *argp1 = 0 ; int res1 = 0 ; @@ -3220,7 +3220,7 @@ SWIGINTERN PyObject *_wrap_security_descriptor_sacl_del(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "ace", NULL + (char *) "self",(char *) "trustee", NULL }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:security_descriptor_sacl_del",kwnames,&obj0,&obj1)) SWIG_fail; @@ -3229,14 +3229,14 @@ SWIGINTERN PyObject *_wrap_security_descriptor_sacl_del(PyObject *SWIGUNUSEDPARM SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_descriptor_sacl_del" "', argument " "1"" of type '" "security_descriptor *""'"); } arg1 = (security_descriptor *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_ace, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_dom_sid, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_descriptor_sacl_del" "', argument " "2"" of type '" "struct security_ace const *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_descriptor_sacl_del" "', argument " "2"" of type '" "struct dom_sid const *""'"); } - arg2 = (struct security_ace *)(argp2); - result = security_descriptor_sacl_del(arg1,(struct security_ace const *)arg2); + arg2 = (struct dom_sid *)(argp2); + result = security_descriptor_sacl_del(arg1,(struct dom_sid const *)arg2); if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", (&result)->v, nt_errstr(result)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if (resultobj == NULL) { diff --git a/source4/libcli/util/errors.i b/source4/libcli/util/errors.i index ec230a9c18..ede536a995 100644 --- a/source4/libcli/util/errors.i +++ b/source4/libcli/util/errors.i @@ -20,7 +20,7 @@ #ifdef SWIGPYTHON %typemap(out,noblock=1) WERROR { if (!W_ERROR_IS_OK($1)) { - PyObject *obj = Py_BuildValue("(i,s)", $1.v, (char *)win_errstr($1)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", $1.v, win_errstr($1)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if ($result == NULL) { @@ -30,7 +30,7 @@ %typemap(out,noblock=1) NTSTATUS { if (NT_STATUS_IS_ERR($1)) { - PyObject *obj = Py_BuildValue("(i,s)", $1.v, (char *)nt_errstr($1)); + PyObject *obj = Py_BuildValue((char *)"(i,s)", $1.v, nt_errstr($1)); PyErr_SetObject(PyExc_RuntimeError, obj); SWIG_fail; } else if ($result == NULL) { |