summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-22 16:09:10 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-22 16:09:10 +1000
commitfd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5 (patch)
tree6e6b4079ecf50b42b862d0f8accc392e5f061cb8 /source4/librpc
parentaf82204f4355ac9011b61019bbbe40e7e3632d4c (diff)
parent8172f3eb220575d40f9ab5129d36e4e0003dee56 (diff)
downloadsamba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.gz
samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.bz2
samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.zip
Merge commit 'origin/v4-0-test' into v4-0-test
(This used to be commit d7f3348c891e14de0e1b195714468ff998400f60)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/config.mk41
-rw-r--r--source4/librpc/rpc/dcerpc.py4
-rw-r--r--source4/librpc/rpc/dcerpc_wrap.c65
3 files changed, 77 insertions, 33 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 69dafb34c6..cbb0d19564 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -722,83 +722,102 @@ PRIVATE_DEPENDENCIES = dcerpc NDR_IRPC EJSRPC
RPC_EJS_IRPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_irpc_ejs.o
[PYTHON::swig_dcerpc]
-SWIG_FILE = rpc/dcerpc.i
+LIBRARY_REALNAME = samba/dcerpc/_dcerpc.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG dcerpc_samr RPC_NDR_LSA DYNCONFIG
swig_dcerpc_OBJ_FILES = $(dcerpcsrcdir)/dcerpc_wrap.o
+$(eval $(call python_py_module_template,samba/dcerpc/__init__.py,$(dcerpcsrcdir)/dcerpc.py))
+
+$(swig_dcerpc_OBJ_FILES): CFLAGS+=$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)
+
[PYTHON::python_echo]
+LIBRARY_REALNAME = samba/dcerpc/echo.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = RPC_NDR_ECHO PYTALLOC param swig_credentials
python_echo_OBJ_FILES = $(gen_ndrsrcdir)/py_echo.o
[PYTHON::python_winreg]
-PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/winreg.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc PYTALLOC param swig_credentials python_dcerpc_misc python_lsa
python_winreg_OBJ_FILES = $(gen_ndrsrcdir)/py_winreg.o
[PYTHON::python_dcerpc_misc]
+LIBRARY_REALNAME = samba/dcerpc/misc.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = PYTALLOC
python_dcerpc_misc_OBJ_FILES = $(gen_ndrsrcdir)/py_misc.o
[PYTHON::python_initshutdown]
-PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/initshutdown.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN PYTALLOC param swig_credentials python_lsa python_dcerpc_security
python_initshutdown_OBJ_FILES = $(gen_ndrsrcdir)/py_initshutdown.o
[PYTHON::python_epmapper]
-PRIVATE_DEPENDENCIES = PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/epmapper.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = dcerpc PYTALLOC param swig_credentials python_dcerpc_misc
python_epmapper_OBJ_FILES = $(gen_ndrsrcdir)/py_epmapper.o
[PYTHON::python_mgmt]
-PRIVATE_DEPENDENCIES = dcerpc_mgmt PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/mgmt.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = PYTALLOC param swig_credentials dcerpc python_dcerpc_misc
python_mgmt_OBJ_FILES = $(gen_ndrsrcdir)/py_mgmt.o
[PYTHON::python_atsvc]
+LIBRARY_REALNAME = samba/dcerpc/atsvc.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = dcerpc_atsvc PYTALLOC param swig_credentials
python_atsvc_OBJ_FILES = $(gen_ndrsrcdir)/py_atsvc.o
[PYTHON::python_samr]
+LIBRARY_REALNAME = samba/dcerpc/samr.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = dcerpc_samr PYTALLOC python_dcerpc_security python_lsa python_dcerpc_misc swig_credentials param
python_samr_OBJ_FILES = $(gen_ndrsrcdir)/py_samr.o
[PYTHON::python_svcctl]
-PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/svcctl.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC param swig_credentials python_dcerpc_misc
python_svcctl_OBJ_FILES = $(gen_ndrsrcdir)/py_svcctl.o
[PYTHON::python_lsa]
-PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/lsa.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC param swig_credentials python_dcerpc_security
python_lsa_OBJ_FILES = $(gen_ndrsrcdir)/py_lsa.o
[PYTHON::python_wkssvc]
-PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/wkssvc.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC param swig_credentials python_lsa python_dcerpc_security
python_wkssvc_OBJ_FILES = $(gen_ndrsrcdir)/py_wkssvc.o
[PYTHON::python_dfs]
-PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/dfs.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC param swig_credentials python_dcerpc_misc
python_dfs_OBJ_FILES = $(gen_ndrsrcdir)/py_dfs.o
[PYTHON::python_unixinfo]
+LIBRARY_REALNAME = samba/dcerpc/unixinfo.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO PYTALLOC param swig_credentials python_dcerpc_security python_dcerpc_misc
python_unixinfo_OBJ_FILES = $(gen_ndrsrcdir)/py_unixinfo.o
[PYTHON::python_drsuapi]
-PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC param swig_credentials
+LIBRARY_REALNAME = samba/dcerpc/drsuapi.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc_security
python_drsuapi_OBJ_FILES = $(gen_ndrsrcdir)/py_drsuapi.o
[PYTHON::python_dcerpc_security]
-PRIVATE_DEPENDENCIES = PYTALLOC
+LIBRARY_REALNAME = samba/dcerpc/security.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = PYTALLOC python_dcerpc_misc
python_dcerpc_security_OBJ_FILES = $(gen_ndrsrcdir)/py_security.o
diff --git a/source4/librpc/rpc/dcerpc.py b/source4/librpc/rpc/dcerpc.py
index 7e4d82d7c4..db5b95cee8 100644
--- a/source4/librpc/rpc/dcerpc.py
+++ b/source4/librpc/rpc/dcerpc.py
@@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.33
+# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.
@@ -57,8 +57,6 @@ def _swig_setattr_nondynamic_method(set):
return set_attr
-import credentials
-import param
pipe_connect = _dcerpc.pipe_connect
dcerpc_server_name = _dcerpc.dcerpc_server_name
diff --git a/source4/librpc/rpc/dcerpc_wrap.c b/source4/librpc/rpc/dcerpc_wrap.c
index bae41c2c22..ff5cdbd390 100644
--- a/source4/librpc/rpc/dcerpc_wrap.c
+++ b/source4/librpc/rpc/dcerpc_wrap.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.33
+ * Version 1.3.35
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -126,7 +126,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -161,6 +161,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -301,10 +302,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -431,8 +432,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -856,7 +857,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1416,7 +1417,7 @@ PySwigObject_dealloc(PyObject *v)
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1434,12 +1435,13 @@ PySwigObject_dealloc(PyObject *v)
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1944,7 +1946,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1965,6 +1967,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1978,7 +1982,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1988,7 +2000,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2053,8 +2066,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2510,7 +2528,7 @@ static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
#define SWIG_name "_dcerpc"
-#define SWIGVERSION 0x010333
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -2912,7 +2930,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -2922,6 +2940,9 @@ SWIG_InitializeModule(void *clientdata) {
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -2950,6 +2971,12 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);