[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1793-g4e5687e

Jelmer Vernooij jelmer at samba.org
Sun May 25 00:40:05 GMT 2008


The branch, v4-0-test has been updated
       via  4e5687e813e50d0bc8d6314e389d1d7a0be2f8c1 (commit)
       via  42537b1d5282784550120358f3641f299351fba7 (commit)
       via  4716cdfb5d5abad85cba18be89d72fe8ee18f359 (commit)
       via  991541a78c2428db89509081cc28072c9b542ffa (commit)
       via  788b2dbfe4b1ef14ab30d487d845e493be46fbd1 (commit)
       via  75ba01a0fad87a9a4788f4c2277d8db0513cef4a (commit)
       via  e3178d522c95871f1db35d7e058906502387a553 (commit)
       via  f1de723b89251cbc8140b838941f304a34871bf3 (commit)
       via  4bcb92d2d49d90863b1e64b15d055517fbfd263c (commit)
       via  9c2eff0289d7c5963da87d5e002f1b80e6e66cdd (commit)
       via  25e7fc8a2c7a5914c4db4bfe428fd0a8efbf0784 (commit)
       via  8501a3fc31e688dba696667a187821480e8cb714 (commit)
      from  468d35827fd055c82c6d43d6ce6d3d561abed54d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 4e5687e813e50d0bc8d6314e389d1d7a0be2f8c1
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun May 25 02:32:21 2008 +0200

    Add initial work for script that uses probing to figure out IDL.

commit 42537b1d5282784550120358f3641f299351fba7
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun May 25 00:04:11 2008 +0200

    Check for fault codes when connecting.

commit 4716cdfb5d5abad85cba18be89d72fe8ee18f359
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 23:39:38 2008 +0200

    Add helper function to return DCE/RPC fault codes.

commit 991541a78c2428db89509081cc28072c9b542ffa
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 23:22:49 2008 +0200

    Add convenience function for creating objects with NDR error codes.

commit 788b2dbfe4b1ef14ab30d487d845e493be46fbd1
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 23:07:16 2008 +0200

    Fix memory initialization in raw calls.

commit 75ba01a0fad87a9a4788f4c2277d8db0513cef4a
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 23:02:09 2008 +0200

    Support optional object argument when sending DCE/RPC requests.

commit e3178d522c95871f1db35d7e058906502387a553
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 22:56:49 2008 +0200

    Allow connecting to a DCE/RPC interface with Python for which we don't have IDL.

commit f1de723b89251cbc8140b838941f304a34871bf3
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 22:13:32 2008 +0200

    Add convenience functions for setting Python objects from errors.

commit 4bcb92d2d49d90863b1e64b15d055517fbfd263c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 21:38:33 2008 +0200

    Export functions for setting NTSTATUS and WERRORs in python.

commit 9c2eff0289d7c5963da87d5e002f1b80e6e66cdd
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 21:20:45 2008 +0200

    Allow request() call to do custom calls on DCE/RPC interfaces.

commit 25e7fc8a2c7a5914c4db4bfe428fd0a8efbf0784
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 21:02:56 2008 +0200

    Use manually written Python bindings for DCE/RPC rather than SWIG based.
    
    Use base class for pidl-generated DCE/RPC interface Python bindings.

commit 8501a3fc31e688dba696667a187821480e8cb714
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 24 20:00:37 2008 +0200

    Share struct used for interfaces in Python code.

-----------------------------------------------------------------------

Summary of changes:
 source/libcli/util/errors.i                        |   10 +-
 source/libcli/util/pyerrors.h                      |   33 +
 source/librpc/config.mk                            |   39 +-
 source/librpc/rpc/dcerpc.h                         |    8 +
 source/librpc/rpc/dcerpc.i                         |  125 -
 source/librpc/rpc/dcerpc.py                        |   83 +-
 source/librpc/rpc/dcerpc_wrap.c                    | 3395 --------------------
 source/librpc/rpc/pyrpc.c                          |  253 ++
 source/librpc/rpc/pyrpc.h                          |   55 +
 source/pidl/lib/Parse/Pidl/Samba4/Python.pm        |   52 +-
 source/scripting/bin/autoidl.py                    |  161 +
 source/scripting/python/misc.i                     |    7 +-
 source/scripting/python/misc_wrap.c                |    6 +-
 source/scripting/python/pyrpc.h                    |   39 -
 source/scripting/python/samba/tests/dcerpc/bare.py |   30 +
 .../scripting/python/samba/tests/dcerpc/rpcecho.py |    5 +
 source/selftest/samba4_tests.sh                    |    2 +-
 17 files changed, 617 insertions(+), 3686 deletions(-)
 create mode 100644 source/libcli/util/pyerrors.h
 delete mode 100644 source/librpc/rpc/dcerpc.i
 delete mode 100644 source/librpc/rpc/dcerpc_wrap.c
 create mode 100644 source/librpc/rpc/pyrpc.c
 create mode 100644 source/librpc/rpc/pyrpc.h
 create mode 100755 source/scripting/bin/autoidl.py
 delete mode 100644 source/scripting/python/pyrpc.h
 create mode 100644 source/scripting/python/samba/tests/dcerpc/bare.py


Changeset truncated at 500 lines:

diff --git a/source/libcli/util/errors.i b/source/libcli/util/errors.i
index 17efcbf..1fcde04 100644
--- a/source/libcli/util/errors.i
+++ b/source/libcli/util/errors.i
@@ -18,10 +18,13 @@
 */
 
 #ifdef SWIGPYTHON
+%{
+#include "libcli/util/pyerrors.h"
+%}
+
 %typemap(out,noblock=1) WERROR {
     if (!W_ERROR_IS_OK($1)) {
-        PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V($1), win_errstr($1));
-        PyErr_SetObject(PyExc_RuntimeError, obj);
+        PyErr_SetWERROR($1);
         SWIG_fail;
     } else if ($result == NULL) {
         $result = Py_None;
@@ -30,8 +33,7 @@
 
 %typemap(out,noblock=1) NTSTATUS {
     if (NT_STATUS_IS_ERR($1)) {
-        PyObject *obj = Py_BuildValue((char *)"(i,s)", NT_STATUS_V($1), nt_errstr($1));
-        PyErr_SetObject(PyExc_RuntimeError, obj);
+        PyErr_SetNTSTATUS($1);
         SWIG_fail;
     } else if ($result == NULL) {
         $result = Py_None;
diff --git a/source/libcli/util/pyerrors.h b/source/libcli/util/pyerrors.h
new file mode 100644
index 0000000..aaa35b4
--- /dev/null
+++ b/source/libcli/util/pyerrors.h
@@ -0,0 +1,33 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2008
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __PYERRORS_H__
+#define __PYERRORS_H__
+
+#define PyErr_FromWERROR(err) Py_BuildValue("(i,s)", W_ERROR_V(err), discard_const_p(char, win_errstr(err)))
+
+#define PyErr_FromNTSTATUS(status) Py_BuildValue("(i,s)", NT_STATUS_V(status), discard_const_p(char, nt_errstr(status)))
+
+#define PyErr_SetWERROR(err) \
+	PyErr_SetObject(PyExc_RuntimeError, PyErr_FromWERROR(err))
+
+#define PyErr_SetNTSTATUS(status) \
+        PyErr_SetObject(PyExc_RuntimeError, PyErr_FromNTSTATUS(status))
+
+#endif /* __PYERRORS_H__ */
diff --git a/source/librpc/config.mk b/source/librpc/config.mk
index c7cbf27..2943c7b 100644
--- a/source/librpc/config.mk
+++ b/source/librpc/config.mk
@@ -607,103 +607,102 @@ PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, rpc/dcerpc.h \
 			gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h)
 
 
-[PYTHON::swig_dcerpc]
-LIBRARY_REALNAME = samba/dcerpc/_dcerpc.$(SHLIBEXT)
-PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG dcerpc_samr RPC_NDR_LSA DYNCONFIG
+[PYTHON::python_dcerpc]
+LIBRARY_REALNAME = samba/dcerpc/base.$(SHLIBEXT)
+PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG dcerpc_samr RPC_NDR_LSA DYNCONFIG swig_credentials param
 
-swig_dcerpc_OBJ_FILES = $(dcerpcsrcdir)/dcerpc_wrap.o
+python_dcerpc_OBJ_FILES = $(dcerpcsrcdir)/pyrpc.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 
+PRIVATE_DEPENDENCIES = RPC_NDR_ECHO PYTALLOC param swig_credentials python_dcerpc
 
 python_echo_OBJ_FILES = $(gen_ndrsrcdir)/py_echo.o
 
 [PYTHON::python_winreg]
 LIBRARY_REALNAME = samba/dcerpc/winreg.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc PYTALLOC param swig_credentials python_dcerpc_misc python_lsa
+PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc PYTALLOC param swig_credentials python_dcerpc_misc python_lsa python_dcerpc
 
 python_winreg_OBJ_FILES = $(gen_ndrsrcdir)/py_winreg.o
 
 [PYTHON::python_dcerpc_misc]
 LIBRARY_REALNAME = samba/dcerpc/misc.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = PYTALLOC
+PRIVATE_DEPENDENCIES = PYTALLOC python_dcerpc
 
 python_dcerpc_misc_OBJ_FILES = $(gen_ndrsrcdir)/py_misc.o
 
 [PYTHON::python_initshutdown]
 LIBRARY_REALNAME = samba/dcerpc/initshutdown.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN PYTALLOC param swig_credentials python_lsa python_dcerpc_security
+PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN PYTALLOC param swig_credentials python_lsa python_dcerpc_security python_dcerpc
 
 python_initshutdown_OBJ_FILES = $(gen_ndrsrcdir)/py_initshutdown.o
 
 [PYTHON::python_epmapper]
 LIBRARY_REALNAME = samba/dcerpc/epmapper.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES =  dcerpc PYTALLOC param swig_credentials python_dcerpc_misc
+PRIVATE_DEPENDENCIES =  dcerpc PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc
 
 python_epmapper_OBJ_FILES = $(gen_ndrsrcdir)/py_epmapper.o
 
 [PYTHON::python_mgmt]
 LIBRARY_REALNAME = samba/dcerpc/mgmt.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = PYTALLOC param swig_credentials dcerpc python_dcerpc_misc
+PRIVATE_DEPENDENCIES = PYTALLOC param swig_credentials dcerpc python_dcerpc_misc python_dcerpc
 
 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 
+PRIVATE_DEPENDENCIES = dcerpc_atsvc PYTALLOC param swig_credentials  python_dcerpc
 
 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
+PRIVATE_DEPENDENCIES = dcerpc_samr PYTALLOC python_dcerpc_security python_lsa python_dcerpc_misc swig_credentials param python_dcerpc
 
 python_samr_OBJ_FILES = $(gen_ndrsrcdir)/py_samr.o
 
 [PYTHON::python_svcctl]
 LIBRARY_REALNAME = samba/dcerpc/svcctl.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC param swig_credentials python_dcerpc_misc
+PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc
 
 python_svcctl_OBJ_FILES = $(gen_ndrsrcdir)/py_svcctl.o
 
 [PYTHON::python_lsa]
 LIBRARY_REALNAME = samba/dcerpc/lsa.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC param swig_credentials python_dcerpc_security
+PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC param swig_credentials python_dcerpc_security python_dcerpc
 
 python_lsa_OBJ_FILES = $(gen_ndrsrcdir)/py_lsa.o
 
 [PYTHON::python_wkssvc]
 LIBRARY_REALNAME = samba/dcerpc/wkssvc.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC param swig_credentials python_lsa python_dcerpc_security
+PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC param swig_credentials python_lsa python_dcerpc_security python_dcerpc
 
 python_wkssvc_OBJ_FILES = $(gen_ndrsrcdir)/py_wkssvc.o
 
 [PYTHON::python_dfs]
 LIBRARY_REALNAME = samba/dcerpc/dfs.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC param swig_credentials python_dcerpc_misc
+PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc
 
 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
+PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO PYTALLOC param swig_credentials python_dcerpc_security python_dcerpc_misc python_dcerpc
 
 python_unixinfo_OBJ_FILES = $(gen_ndrsrcdir)/py_unixinfo.o
 
 [PYTHON::python_drsuapi]
 LIBRARY_REALNAME = samba/dcerpc/drsuapi.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc_security
+PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc_security python_dcerpc
 
 python_drsuapi_OBJ_FILES = $(gen_ndrsrcdir)/py_drsuapi.o
 
 [PYTHON::python_dcerpc_security]
 LIBRARY_REALNAME = samba/dcerpc/security.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = PYTALLOC python_dcerpc_misc
+PRIVATE_DEPENDENCIES = PYTALLOC python_dcerpc_misc python_dcerpc
 
 python_dcerpc_security_OBJ_FILES = $(gen_ndrsrcdir)/py_security.o
 
diff --git a/source/librpc/rpc/dcerpc.h b/source/librpc/rpc/dcerpc.h
index 805f546..ca6311a 100644
--- a/source/librpc/rpc/dcerpc.h
+++ b/source/librpc/rpc/dcerpc.h
@@ -362,5 +362,13 @@ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx,
 				   struct epm_tower *tower, 
 				   struct dcerpc_binding **b_out);
 
+NTSTATUS dcerpc_request(struct dcerpc_pipe *p, 
+			struct GUID *object,
+			uint16_t opnum,
+			bool async,
+			TALLOC_CTX *mem_ctx,
+			DATA_BLOB *stub_data_in,
+			DATA_BLOB *stub_data_out);
+
 
 #endif /* __DCERPC_H__ */
diff --git a/source/librpc/rpc/dcerpc.i b/source/librpc/rpc/dcerpc.i
deleted file mode 100644
index 2d7c27b..0000000
--- a/source/librpc/rpc/dcerpc.i
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Tastes like -*- C -*- */
-
-/* 
-   Unix SMB/CIFS implementation.
-
-   Swig interface to librpc functions.
-
-   Copyright (C) Tim Potter 2004
-   Copyright (C) Jelmer Vernooij 2007
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-%define DOCSTRING
-"DCE/RPC protocol implementation"
-%enddef
-
-%module(docstring=DOCSTRING) dcerpc
-
-%{
-
-/* This symbol is used in both includes.h and Python.h which causes an
-   annoying compiler warning. */
-
-#ifdef HAVE_FSTAT
-#undef HAVE_FSTAT
-#endif
-
-#include "includes.h"
-#include "dynconfig.h"
-#include "librpc/rpc/dcerpc.h"
-#include "param/param.h"
-
-#undef strcpy
-
-%}
-
-%import "../../lib/talloc/talloc.i"
-%import "../../auth/credentials/credentials.i"
-
-%typemap(in,noblock=1, numinputs=0) struct dcerpc_pipe **OUT (struct dcerpc_pipe *temp_dcerpc_pipe) {
-        $1 = &temp_dcerpc_pipe;
-}
-
-%typemap(argout,noblock=1) struct dcerpc_pipe ** {
-	/* Set REF_ALLOC flag so we don't have to do too much extra
-	   mucking around with ref variables in ndr unmarshalling. */
-
-	(*$1)->conn->flags |= DCERPC_NDR_REF_ALLOC;
-
-	/* Return swig handle on dcerpc_pipe */
-
-    $result = SWIG_NewPointerObj(*$1, SWIGTYPE_p_dcerpc_pipe, 0);
-}
-
-%types(struct dcerpc_pipe *);
-
-%rename(pipe_connect) dcerpc_pipe_connect;
-
-NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx, 
-			     struct dcerpc_pipe **pp, 
-			     const char *binding,
-			     const struct ndr_interface_table *table,
-			     struct cli_credentials *credentials,
-			     struct event_context *ev,
-			     struct loadparm_context *lp_ctx);
-
-%typemap(in,noblock=1) DATA_BLOB * (DATA_BLOB temp_data_blob) {
-	temp_data_blob.data = PyString_AsString($input);
-	temp_data_blob.length = PyString_Size($input);
-	$1 = &temp_data_blob;
-}
-
-const char *dcerpc_server_name(struct dcerpc_pipe *p);
-
-/* Some typemaps for easier access to resume handles.  Really this can
-   also be done using the uint32 carray functions, but it's a bit of a
-   hassle.  TODO: Fix memory leak here. */
-
-%typemap(in,noblock=1) uint32_t *resume_handle {
-	$1 = malloc(sizeof(*$1));
-	*$1 = PyLong_AsLong($input);
-}
-
-%typemap(out,noblock=1) uint32_t *resume_handle {
-	$result = PyLong_FromLong(*$1);
-}
-
-%typemap(in,noblock=1) struct policy_handle * {
-
-	if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,
-			     SWIG_POINTER_EXCEPTION)) == -1) 
-	        return NULL;
-
-	if ($1 == NULL) {
-		PyErr_SetString(PyExc_TypeError, "None is not a valid policy handle");
-		return NULL;
-	}
-}
-
-/* When returning a policy handle to Python we need to make a copy of
-   as the talloc context it is created under is destroyed after the
-   wrapper function returns.  TODO: Fix memory leak created here. */
-
-%typemap(out,noblock=1) struct policy_handle * {
-	if ($1) {
-		struct policy_handle *temp = (struct policy_handle *)malloc(sizeof(struct policy_handle));
-		memcpy(temp, $1, sizeof(struct policy_handle));
-		$result = SWIG_NewPointerObj(temp, SWIGTYPE_p_policy_handle, 0);
-	} else {
-		Py_INCREF(Py_None);
-		$result = Py_None;
-	}
-}
diff --git a/source/librpc/rpc/dcerpc.py b/source/librpc/rpc/dcerpc.py
index 5c26656..1a76ecc 100644
--- a/source/librpc/rpc/dcerpc.py
+++ b/source/librpc/rpc/dcerpc.py
@@ -1,67 +1,20 @@
-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.35
+#!/usr/bin/python
+
+# Unix SMB/CIFS implementation.
+# Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2008
+#   
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#   
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#   
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Don't modify this file, modify the SWIG interface instead.
-
-"""
-DCE/RPC protocol implementation
-"""
-
-import _dcerpc
-import new
-new_instancemethod = new.instancemethod
-try:
-    _swig_property = property
-except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'PySwigObject':
-            self.__dict__[name] = value
-            return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
-    if (not static) or hasattr(self,name):
-        self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
-
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
-def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError,name
-
-def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
-import types
-try:
-    _object = types.ObjectType
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-del types
-
-
-def _swig_setattr_nondynamic_method(set):
-    def set_attr(self,name,value):
-        if (name == "thisown"): return self.this.own(value)
-        if hasattr(self,name) or (name == "this"):
-            set(self,name,value)
-        else:
-            raise AttributeError("You cannot add attributes to %s" % self)
-    return set_attr
-
-
-pipe_connect = _dcerpc.pipe_connect
-dcerpc_server_name = _dcerpc.dcerpc_server_name
-
 
+from base import *
diff --git a/source/librpc/rpc/dcerpc_wrap.c b/source/librpc/rpc/dcerpc_wrap.c
deleted file mode 100644
index ff5cdbd..0000000
--- a/source/librpc/rpc/dcerpc_wrap.c
+++ /dev/null
@@ -1,3395 +0,0 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * 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
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGPYTHON
-#define SWIG_PYTHON_NO_BUILD_NONE
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-#  define SWIGTEMPLATEDISAMBIGUATOR
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list