summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/auth.py11
-rw-r--r--source4/auth/auth_wrap.c15
-rw-r--r--source4/auth/credentials/credentials.py59
-rw-r--r--source4/auth/credentials/credentials_wrap.c26
-rw-r--r--source4/lib/events/events.py11
-rw-r--r--source4/lib/events/events_wrap.c23
-rw-r--r--source4/lib/ldb/ldb.py145
-rw-r--r--source4/lib/ldb/ldb_wrap.c365
-rw-r--r--source4/lib/registry/registry.py43
-rw-r--r--source4/lib/registry/registry_wrap.c55
-rw-r--r--source4/lib/tdb/tdb.py67
-rw-r--r--source4/lib/tdb/tdb_wrap.c179
-rw-r--r--source4/libcli/security/security.py77
-rw-r--r--source4/libcli/security/security_wrap.c120
-rw-r--r--source4/librpc/rpc/dcerpc.py59
-rw-r--r--source4/librpc/rpc/dcerpc_wrap.c26
-rw-r--r--source4/scripting/python/config.mk2
-rw-r--r--source4/scripting/python/misc.py11
-rw-r--r--source4/scripting/python/misc_wrap.c15
19 files changed, 755 insertions, 554 deletions
diff --git a/source4/auth/auth.py b/source4/auth/auth.py
index d93591278f..761bf29107 100644
--- a/source4/auth/auth.py
+++ b/source4/auth/auth.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _auth
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
system_session = _auth.system_session
system_session_anon = _auth.system_session_anon
diff --git a/source4/auth/auth_wrap.c b/source4/auth/auth_wrap.c
index 4a6b509fda..30980400c5 100644
--- a/source4/auth/auth_wrap.c
+++ b/source4/auth/auth_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2480,6 +2480,19 @@ static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _auth.so
diff --git a/source4/auth/credentials/credentials.py b/source4/auth/credentials/credentials.py
index eb44b0789a..8948973e82 100644
--- a/source4/auth/credentials/credentials.py
+++ b/source4/auth/credentials/credentials.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _credentials
import new
@@ -48,36 +47,40 @@ except AttributeError:
del types
-class Credentials(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Credentials, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Credentials, name)
+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
+
+
+class Credentials(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _credentials.new_Credentials(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _credentials.Credentials_swiginit(self,_credentials.new_Credentials(*args, **kwargs))
__swig_destroy__ = _credentials.delete_Credentials
- __del__ = lambda self : None;
- def get_username(*args, **kwargs): return _credentials.Credentials_get_username(*args, **kwargs)
- def set_username(*args, **kwargs): return _credentials.Credentials_set_username(*args, **kwargs)
- def get_password(*args, **kwargs): return _credentials.Credentials_get_password(*args, **kwargs)
- def set_password(*args, **kwargs): return _credentials.Credentials_set_password(*args, **kwargs)
- def get_domain(*args, **kwargs): return _credentials.Credentials_get_domain(*args, **kwargs)
- def set_domain(*args, **kwargs): return _credentials.Credentials_set_domain(*args, **kwargs)
- def get_realm(*args, **kwargs): return _credentials.Credentials_get_realm(*args, **kwargs)
- def set_realm(*args, **kwargs): return _credentials.Credentials_set_realm(*args, **kwargs)
- def parse_string(*args, **kwargs): return _credentials.Credentials_parse_string(*args, **kwargs)
- def get_bind_dn(*args, **kwargs): return _credentials.Credentials_get_bind_dn(*args, **kwargs)
- def set_bind_dn(*args, **kwargs): return _credentials.Credentials_set_bind_dn(*args, **kwargs)
- def get_workstation(*args, **kwargs): return _credentials.Credentials_get_workstation(*args, **kwargs)
- def set_workstation(*args, **kwargs): return _credentials.Credentials_set_workstation(*args, **kwargs)
- def guess(*args, **kwargs): return _credentials.Credentials_guess(*args, **kwargs)
- def is_anonymous(*args, **kwargs): return _credentials.Credentials_is_anonymous(*args, **kwargs)
- def get_nt_hash(*args, **kwargs): return _credentials.Credentials_get_nt_hash(*args, **kwargs)
- def authentication_requested(*args, **kwargs): return _credentials.Credentials_authentication_requested(*args, **kwargs)
- def wrong_password(*args, **kwargs): return _credentials.Credentials_wrong_password(*args, **kwargs)
+Credentials.get_username = new_instancemethod(_credentials.Credentials_get_username,None,Credentials)
+Credentials.set_username = new_instancemethod(_credentials.Credentials_set_username,None,Credentials)
+Credentials.get_password = new_instancemethod(_credentials.Credentials_get_password,None,Credentials)
+Credentials.set_password = new_instancemethod(_credentials.Credentials_set_password,None,Credentials)
+Credentials.get_domain = new_instancemethod(_credentials.Credentials_get_domain,None,Credentials)
+Credentials.set_domain = new_instancemethod(_credentials.Credentials_set_domain,None,Credentials)
+Credentials.get_realm = new_instancemethod(_credentials.Credentials_get_realm,None,Credentials)
+Credentials.set_realm = new_instancemethod(_credentials.Credentials_set_realm,None,Credentials)
+Credentials.parse_string = new_instancemethod(_credentials.Credentials_parse_string,None,Credentials)
+Credentials.get_bind_dn = new_instancemethod(_credentials.Credentials_get_bind_dn,None,Credentials)
+Credentials.set_bind_dn = new_instancemethod(_credentials.Credentials_set_bind_dn,None,Credentials)
+Credentials.get_workstation = new_instancemethod(_credentials.Credentials_get_workstation,None,Credentials)
+Credentials.set_workstation = new_instancemethod(_credentials.Credentials_set_workstation,None,Credentials)
+Credentials.guess = new_instancemethod(_credentials.Credentials_guess,None,Credentials)
+Credentials.is_anonymous = new_instancemethod(_credentials.Credentials_is_anonymous,None,Credentials)
+Credentials.get_nt_hash = new_instancemethod(_credentials.Credentials_get_nt_hash,None,Credentials)
+Credentials.authentication_requested = new_instancemethod(_credentials.Credentials_authentication_requested,None,Credentials)
+Credentials.wrong_password = new_instancemethod(_credentials.Credentials_wrong_password,None,Credentials)
Credentials_swigregister = _credentials.Credentials_swigregister
Credentials_swigregister(Credentials)
diff --git a/source4/auth/credentials/credentials_wrap.c b/source4/auth/credentials/credentials_wrap.c
index 9887061a7e..9fd5814327 100644
--- a/source4/auth/credentials/credentials_wrap.c
+++ b/source4/auth/credentials/credentials_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2472,6 +2472,19 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _credentials.so
@@ -2755,7 +2768,7 @@ SWIGINTERN PyObject *_wrap_new_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObj
PyObject *resultobj = 0;
cli_credentials *result = 0 ;
- if (!PyArg_ParseTuple(args,(char *)":new_Credentials")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_Credentials",0,0,0)) SWIG_fail;
result = (cli_credentials *)new_cli_credentials();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cli_credentials, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3522,13 +3535,17 @@ fail:
SWIGINTERN PyObject *Credentials_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_cli_credentials, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Credentials_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
static PyMethodDef SwigMethods[] = {
- { (char *)"new_Credentials", _wrap_new_Credentials, METH_VARARGS, NULL},
+ { (char *)"new_Credentials", (PyCFunction)_wrap_new_Credentials, METH_NOARGS, NULL},
{ (char *)"delete_Credentials", (PyCFunction) _wrap_delete_Credentials, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_username", (PyCFunction) _wrap_Credentials_get_username, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_username", (PyCFunction) _wrap_Credentials_set_username, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -3549,6 +3566,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Credentials_authentication_requested", (PyCFunction) _wrap_Credentials_authentication_requested, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_wrong_password", (PyCFunction) _wrap_Credentials_wrong_password, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_swigregister", Credentials_swigregister, METH_VARARGS, NULL},
+ { (char *)"Credentials_swiginit", Credentials_swiginit, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL }
};
diff --git a/source4/lib/events/events.py b/source4/lib/events/events.py
index 9cce31fac4..1e41e2d7e7 100644
--- a/source4/lib/events/events.py
+++ b/source4/lib/events/events.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _events
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
event_context_init = _events.event_context_init
event_context_init_byname = _events.event_context_init_byname
event_backend_list = _events.event_backend_list
diff --git a/source4/lib/events/events_wrap.c b/source4/lib/events/events_wrap.c
index b2381d5160..08158cdc63 100644
--- a/source4/lib/events/events_wrap.c
+++ b/source4/lib/events/events_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2472,6 +2472,19 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _events.so
@@ -2569,7 +2582,7 @@ SWIGINTERN PyObject *_wrap_event_context_init(PyObject *SWIGUNUSEDPARM(self), Py
{
arg1 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)":event_context_init")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"event_context_init",0,0,0)) SWIG_fail;
result = (struct event_context *)event_context_init(arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_event_context, 0 | 0 );
return resultobj;
@@ -2618,7 +2631,7 @@ SWIGINTERN PyObject *_wrap_event_backend_list(PyObject *SWIGUNUSEDPARM(self), Py
{
arg1 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)":event_backend_list")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"event_backend_list",0,0,0)) SWIG_fail;
result = (char **)event_backend_list(arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 );
return resultobj;
@@ -2628,9 +2641,9 @@ fail:
static PyMethodDef SwigMethods[] = {
- { (char *)"event_context_init", _wrap_event_context_init, METH_VARARGS, NULL},
+ { (char *)"event_context_init", (PyCFunction)_wrap_event_context_init, METH_NOARGS, NULL},
{ (char *)"event_context_init_byname", (PyCFunction) _wrap_event_context_init_byname, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"event_backend_list", _wrap_event_backend_list, METH_VARARGS, NULL},
+ { (char *)"event_backend_list", (PyCFunction)_wrap_event_backend_list, METH_NOARGS, NULL},
{ NULL, NULL, 0, NULL }
};
diff --git a/source4/lib/ldb/ldb.py b/source4/lib/ldb/ldb.py
index b887b21aea..d9ddb8af0a 100644
--- a/source4/lib/ldb/ldb.py
+++ b/source4/lib/ldb/ldb.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _ldb
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
SCOPE_DEFAULT = _ldb.SCOPE_DEFAULT
SCOPE_BASE = _ldb.SCOPE_BASE
SCOPE_ONELEVEL = _ldb.SCOPE_ONELEVEL
@@ -56,51 +65,41 @@ CHANGETYPE_NONE = _ldb.CHANGETYPE_NONE
CHANGETYPE_ADD = _ldb.CHANGETYPE_ADD
CHANGETYPE_DELETE = _ldb.CHANGETYPE_DELETE
CHANGETYPE_MODIFY = _ldb.CHANGETYPE_MODIFY
-class Dn(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Dn, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Dn, name)
+class Dn(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _ldb.new_Dn(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _ldb.Dn_swiginit(self,_ldb.new_Dn(*args, **kwargs))
__swig_destroy__ = _ldb.delete_Dn
- __del__ = lambda self : None;
- def validate(*args, **kwargs): return _ldb.Dn_validate(*args, **kwargs)
- def get_casefold(*args, **kwargs): return _ldb.Dn_get_casefold(*args, **kwargs)
- def __str__(*args, **kwargs): return _ldb.Dn___str__(*args, **kwargs)
- def parent(*args, **kwargs): return _ldb.Dn_parent(*args, **kwargs)
- def __cmp__(*args, **kwargs): return _ldb.Dn___cmp__(*args, **kwargs)
- def is_valid(*args, **kwargs): return _ldb.Dn_is_valid(*args, **kwargs)
- def is_special(*args, **kwargs): return _ldb.Dn_is_special(*args, **kwargs)
- def is_null(*args, **kwargs): return _ldb.Dn_is_null(*args, **kwargs)
- def check_special(*args, **kwargs): return _ldb.Dn_check_special(*args, **kwargs)
- def __len__(*args, **kwargs): return _ldb.Dn___len__(*args, **kwargs)
- def add_child(*args, **kwargs): return _ldb.Dn_add_child(*args, **kwargs)
- def add_base(*args, **kwargs): return _ldb.Dn_add_base(*args, **kwargs)
- def canonical_str(*args, **kwargs): return _ldb.Dn_canonical_str(*args, **kwargs)
- def canonical_ex_str(*args, **kwargs): return _ldb.Dn_canonical_ex_str(*args, **kwargs)
- def __add__(*args, **kwargs): return _ldb.Dn___add__(*args, **kwargs)
+Dn.validate = new_instancemethod(_ldb.Dn_validate,None,Dn)
+Dn.get_casefold = new_instancemethod(_ldb.Dn_get_casefold,None,Dn)
+Dn.__str__ = new_instancemethod(_ldb.Dn___str__,None,Dn)
+Dn.parent = new_instancemethod(_ldb.Dn_parent,None,Dn)
+Dn.__cmp__ = new_instancemethod(_ldb.Dn___cmp__,None,Dn)
+Dn.is_valid = new_instancemethod(_ldb.Dn_is_valid,None,Dn)
+Dn.is_special = new_instancemethod(_ldb.Dn_is_special,None,Dn)
+Dn.is_null = new_instancemethod(_ldb.Dn_is_null,None,Dn)
+Dn.check_special = new_instancemethod(_ldb.Dn_check_special,None,Dn)
+Dn.__len__ = new_instancemethod(_ldb.Dn___len__,None,Dn)
+Dn.add_child = new_instancemethod(_ldb.Dn_add_child,None,Dn)
+Dn.add_base = new_instancemethod(_ldb.Dn_add_base,None,Dn)
+Dn.canonical_str = new_instancemethod(_ldb.Dn_canonical_str,None,Dn)
+Dn.canonical_ex_str = new_instancemethod(_ldb.Dn_canonical_ex_str,None,Dn)
+Dn.__add__ = new_instancemethod(_ldb.Dn___add__,None,Dn)
Dn_swigregister = _ldb.Dn_swigregister
Dn_swigregister(Dn)
ldb_dn_from_pyobject = _ldb.ldb_dn_from_pyobject
ldb_msg_element_from_pyobject = _ldb.ldb_msg_element_from_pyobject
ldb_msg_element_to_set = _ldb.ldb_msg_element_to_set
-class ldb_msg_element(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, ldb_msg_element, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, ldb_msg_element, name)
+class ldb_msg_element(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
- def __iter__(*args, **kwargs): return _ldb.ldb_msg_element___iter__(*args, **kwargs)
- def __set__(*args, **kwargs): return _ldb.ldb_msg_element___set__(*args, **kwargs)
__swig_destroy__ = _ldb.delete_ldb_msg_element
- __del__ = lambda self : None;
- def __cmp__(*args, **kwargs): return _ldb.ldb_msg_element___cmp__(*args, **kwargs)
+ldb_msg_element.__iter__ = new_instancemethod(_ldb.ldb_msg_element___iter__,None,ldb_msg_element)
+ldb_msg_element.__set__ = new_instancemethod(_ldb.ldb_msg_element___set__,None,ldb_msg_element)
+ldb_msg_element.__cmp__ = new_instancemethod(_ldb.ldb_msg_element___cmp__,None,ldb_msg_element)
ldb_msg_element_swigregister = _ldb.ldb_msg_element_swigregister
ldb_msg_element_swigregister(ldb_msg_element)
@@ -109,27 +108,19 @@ def MessageElement(*args, **kwargs):
return val
ldb_msg_list_elements = _ldb.ldb_msg_list_elements
-class Message(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Message, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Message, name)
+class Message(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
- __swig_setmethods__["dn"] = _ldb.Message_dn_set
- __swig_getmethods__["dn"] = _ldb.Message_dn_get
- if _newclass:dn = _swig_property(_ldb.Message_dn_get, _ldb.Message_dn_set)
+ dn = _swig_property(_ldb.Message_dn_get, _ldb.Message_dn_set)
def __init__(self, *args, **kwargs):
- this = _ldb.new_Message(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _ldb.Message_swiginit(self,_ldb.new_Message(*args, **kwargs))
__swig_destroy__ = _ldb.delete_Message
- __del__ = lambda self : None;
- def __getitem__(*args, **kwargs): return _ldb.Message___getitem__(*args, **kwargs)
- def __setitem__(*args): return _ldb.Message___setitem__(*args)
- def __len__(*args, **kwargs): return _ldb.Message___len__(*args, **kwargs)
- def keys(*args, **kwargs): return _ldb.Message_keys(*args, **kwargs)
- def __iter__(*args, **kwargs): return _ldb.Message___iter__(*args, **kwargs)
- def __delitem__(*args, **kwargs): return _ldb.Message___delitem__(*args, **kwargs)
+Message.__getitem__ = new_instancemethod(_ldb.Message___getitem__,None,Message)
+Message.__setitem__ = new_instancemethod(_ldb.Message___setitem__,None,Message)
+Message.__len__ = new_instancemethod(_ldb.Message___len__,None,Message)
+Message.keys = new_instancemethod(_ldb.Message_keys,None,Message)
+Message.__iter__ = new_instancemethod(_ldb.Message___iter__,None,Message)
+Message.__delitem__ = new_instancemethod(_ldb.Message___delitem__,None,Message)
Message_swigregister = _ldb.Message_swigregister
Message_swigregister(Message)
@@ -174,36 +165,32 @@ LDB_ERR_ENTRY_ALREADY_EXISTS = _ldb.LDB_ERR_ENTRY_ALREADY_EXISTS
LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED = _ldb.LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED
LDB_ERR_AFFECTS_MULTIPLE_DSAS = _ldb.LDB_ERR_AFFECTS_MULTIPLE_DSAS
LDB_ERR_OTHER = _ldb.LDB_ERR_OTHER
-class ldb(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, ldb, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, ldb, name)
+class ldb(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
- def connect(*args, **kwargs): return _ldb.ldb_connect(*args, **kwargs)
__swig_destroy__ = _ldb.delete_ldb
- __del__ = lambda self : None;
- def search(*args, **kwargs): return _ldb.ldb_search(*args, **kwargs)
- def delete(*args, **kwargs): return _ldb.ldb_delete(*args, **kwargs)
- def rename(*args, **kwargs): return _ldb.ldb_rename(*args, **kwargs)
- def add(*args, **kwargs): return _ldb.ldb_add(*args, **kwargs)
- def modify(*args, **kwargs): return _ldb.ldb_modify(*args, **kwargs)
- def get_config_basedn(*args, **kwargs): return _ldb.ldb_get_config_basedn(*args, **kwargs)
- def get_root_basedn(*args, **kwargs): return _ldb.ldb_get_root_basedn(*args, **kwargs)
- def get_schema_basedn(*args, **kwargs): return _ldb.ldb_get_schema_basedn(*args, **kwargs)
- def get_default_basedn(*args, **kwargs): return _ldb.ldb_get_default_basedn(*args, **kwargs)
- def errstring(*args, **kwargs): return _ldb.ldb_errstring(*args, **kwargs)
- def set_create_perms(*args, **kwargs): return _ldb.ldb_set_create_perms(*args, **kwargs)
- def set_modules_dir(*args, **kwargs): return _ldb.ldb_set_modules_dir(*args, **kwargs)
- def set_debug(*args, **kwargs): return _ldb.ldb_set_debug(*args, **kwargs)
- def set_opaque(*args, **kwargs): return _ldb.ldb_set_opaque(*args, **kwargs)
- def get_opaque(*args, **kwargs): return _ldb.ldb_get_opaque(*args, **kwargs)
- def transaction_start(*args, **kwargs): return _ldb.ldb_transaction_start(*args, **kwargs)
- def transaction_commit(*args, **kwargs): return _ldb.ldb_transaction_commit(*args, **kwargs)
- def transaction_cancel(*args, **kwargs): return _ldb.ldb_transaction_cancel(*args, **kwargs)
- def __contains__(*args, **kwargs): return _ldb.ldb___contains__(*args, **kwargs)
- def parse_ldif(*args, **kwargs): return _ldb.ldb_parse_ldif(*args, **kwargs)
+ldb.connect = new_instancemethod(_ldb.ldb_connect,None,ldb)
+ldb.search = new_instancemethod(_ldb.ldb_search,None,ldb)
+ldb.delete = new_instancemethod(_ldb.ldb_delete,None,ldb)
+ldb.rename = new_instancemethod(_ldb.ldb_rename,None,ldb)
+ldb.add = new_instancemethod(_ldb.ldb_add,None,ldb)
+ldb.modify = new_instancemethod(_ldb.ldb_modify,None,ldb)
+ldb.get_config_basedn = new_instancemethod(_ldb.ldb_get_config_basedn,None,ldb)
+ldb.get_root_basedn = new_instancemethod(_ldb.ldb_get_root_basedn,None,ldb)
+ldb.get_schema_basedn = new_instancemethod(_ldb.ldb_get_schema_basedn,None,ldb)
+ldb.get_default_basedn = new_instancemethod(_ldb.ldb_get_default_basedn,None,ldb)
+ldb.errstring = new_instancemethod(_ldb.ldb_errstring,None,ldb)
+ldb.set_create_perms = new_instancemethod(_ldb.ldb_set_create_perms,None,ldb)
+ldb.set_modules_dir = new_instancemethod(_ldb.ldb_set_modules_dir,None,ldb)
+ldb.set_debug = new_instancemethod(_ldb.ldb_set_debug,None,ldb)
+ldb.set_opaque = new_instancemethod(_ldb.ldb_set_opaque,None,ldb)
+ldb.get_opaque = new_instancemethod(_ldb.ldb_get_opaque,None,ldb)
+ldb.transaction_start = new_instancemethod(_ldb.ldb_transaction_start,None,ldb)
+ldb.transaction_commit = new_instancemethod(_ldb.ldb_transaction_commit,None,ldb)
+ldb.transaction_cancel = new_instancemethod(_ldb.ldb_transaction_cancel,None,ldb)
+ldb.__contains__ = new_instancemethod(_ldb.ldb___contains__,None,ldb)
+ldb.parse_ldif = new_instancemethod(_ldb.ldb_parse_ldif,None,ldb)
ldb_swigregister = _ldb.ldb_swigregister
ldb_swigregister(ldb)
diff --git a/source4/lib/ldb/ldb_wrap.c b/source4/lib/ldb/ldb_wrap.c
index b542fd6b8b..c0e74d0115 100644
--- a/source4/lib/ldb/ldb_wrap.c
+++ b/source4/lib/ldb/ldb_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2492,6 +2492,19 @@ static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _ldb.so
@@ -3096,10 +3109,11 @@ SWIGINTERN PyObject *_wrap_delete_Dn(PyObject *SWIGUNUSEDPARM(self), PyObject *a
ldb_dn *arg1 = (ldb_dn *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_Dn",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dn" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3119,10 +3133,11 @@ SWIGINTERN PyObject *_wrap_Dn_validate(PyObject *SWIGUNUSEDPARM(self), PyObject
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_validate",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_validate" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3141,10 +3156,11 @@ SWIGINTERN PyObject *_wrap_Dn_get_casefold(PyObject *SWIGUNUSEDPARM(self), PyObj
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_get_casefold",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_get_casefold" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3163,10 +3179,11 @@ SWIGINTERN PyObject *_wrap_Dn___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn___str__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn___str__" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3185,10 +3202,11 @@ SWIGINTERN PyObject *_wrap_Dn_parent(PyObject *SWIGUNUSEDPARM(self), PyObject *a
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_parent",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_parent" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3241,10 +3259,11 @@ SWIGINTERN PyObject *_wrap_Dn_is_valid(PyObject *SWIGUNUSEDPARM(self), PyObject
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_is_valid",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_is_valid" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3263,10 +3282,11 @@ SWIGINTERN PyObject *_wrap_Dn_is_special(PyObject *SWIGUNUSEDPARM(self), PyObjec
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_is_special",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_is_special" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3285,10 +3305,11 @@ SWIGINTERN PyObject *_wrap_Dn_is_null(PyObject *SWIGUNUSEDPARM(self), PyObject *
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_is_null",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_is_null" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3344,10 +3365,11 @@ SWIGINTERN PyObject *_wrap_Dn___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn___len__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn___len__" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3434,10 +3456,11 @@ SWIGINTERN PyObject *_wrap_Dn_canonical_str(PyObject *SWIGUNUSEDPARM(self), PyOb
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_canonical_str",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_canonical_str" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3456,10 +3479,11 @@ SWIGINTERN PyObject *_wrap_Dn_canonical_ex_str(PyObject *SWIGUNUSEDPARM(self), P
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Dn_canonical_ex_str",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_dn, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dn_canonical_ex_str" "', argument " "1"" of type '" "ldb_dn *""'");
}
@@ -3508,11 +3532,15 @@ fail:
SWIGINTERN PyObject *Dn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ldb_dn, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Dn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_ldb_dn_from_pyobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
PyObject *arg1 = (PyObject *) 0 ;
@@ -3612,10 +3640,11 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element___iter__(PyObject *SWIGUNUSEDPARM(sel
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_msg_element___iter__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___iter__" "', argument " "1"" of type '" "ldb_msg_element *""'");
}
@@ -3634,10 +3663,11 @@ SWIGINTERN PyObject *_wrap_ldb_msg_element___set__(PyObject *SWIGUNUSEDPARM(self
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_msg_element___set__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_msg_element___set__" "', argument " "1"" of type '" "ldb_msg_element *""'");
}
@@ -3699,10 +3729,11 @@ SWIGINTERN PyObject *_wrap_delete_ldb_msg_element(PyObject *SWIGUNUSEDPARM(self)
ldb_msg_element *arg1 = (ldb_msg_element *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_ldb_msg_element",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message_element, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message_element, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ldb_msg_element" "', argument " "1"" of type '" "ldb_msg_element *""'");
}
@@ -3752,7 +3783,7 @@ fail:
SWIGINTERN PyObject *ldb_msg_element_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ldb_message_element, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -3795,16 +3826,15 @@ SWIGINTERN PyObject *_wrap_Message_dn_set(PyObject *SWIGUNUSEDPARM(self), PyObje
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
+ PyObject *swig_obj[2] ;
- if (!PyArg_ParseTuple(args,(char *)"OO:Message_dn_set",&obj0,&obj1)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if (!SWIG_Python_UnpackTuple(args,"Message_dn_set",2,2,swig_obj)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message_dn_set" "', argument " "1"" of type '" "ldb_msg *""'");
}
arg1 = (ldb_msg *)(argp1);
- res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ldb_dn, SWIG_POINTER_DISOWN | 0 );
+ res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ldb_dn, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Message_dn_set" "', argument " "2"" of type '" "ldb_dn *""'");
}
@@ -3829,10 +3859,11 @@ SWIGINTERN PyObject *_wrap_Message_dn_get(PyObject *SWIGUNUSEDPARM(self), PyObje
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Message_dn_get",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message_dn_get" "', argument " "1"" of type '" "ldb_msg *""'");
}
@@ -3882,10 +3913,11 @@ SWIGINTERN PyObject *_wrap_delete_Message(PyObject *SWIGUNUSEDPARM(self), PyObje
ldb_msg *arg1 = (ldb_msg *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_Message",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Message" "', argument " "1"" of type '" "ldb_msg *""'");
}
@@ -3951,7 +3983,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
PyObject *resultobj = 0;
ldb_msg *arg1 = (ldb_msg *) 0 ;
char *arg2 = (char *) 0 ;
@@ -3963,22 +3995,19 @@ SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(
int alloc2 = 0 ;
void *argp3 = 0 ;
int res3 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO:Message___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message___setitem__" "', argument " "1"" of type '" "ldb_msg *""'");
}
arg1 = (ldb_msg *)(argp1);
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Message___setitem__" "', argument " "2"" of type '" "char const *""'");
}
arg2 = (char *)(buf2);
- res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ldb_message_element, 0 | 0 );
+ res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ldb_message_element, 0 | 0 );
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Message___setitem__" "', argument " "3"" of type '" "ldb_msg_element *""'");
}
@@ -3998,7 +4027,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
PyObject *resultobj = 0;
ldb_msg *arg1 = (ldb_msg *) 0 ;
char *arg2 = (char *) 0 ;
@@ -4008,22 +4037,19 @@ SWIGINTERN PyObject *_wrap_Message___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO:Message___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message___setitem__" "', argument " "1"" of type '" "ldb_msg *""'");
}
arg1 = (ldb_msg *)(argp1);
- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Message___setitem__" "', argument " "2"" of type '" "char const *""'");
}
arg2 = (char *)(buf2);
- arg3 = obj2;
+ arg3 = swig_obj[2];
{
if (arg1 == NULL)
SWIG_exception(SWIG_ValueError,
@@ -4042,46 +4068,23 @@ fail:
SWIGINTERN PyObject *_wrap_Message___setitem__(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[4];
- int ii;
- if (!PyTuple_Check(args)) SWIG_fail;
- argc = (int)PyObject_Length(args);
- for (ii = 0; (ii < argc) && (ii < 3); ii++) {
- argv[ii] = PyTuple_GET_ITEM(args,ii);
- }
+ if (!(argc = SWIG_Python_UnpackTuple(args,"Message___setitem__",0,3,argv))) SWIG_fail;
+ --argc;
if (argc == 3) {
- int _v;
- void *vptr = 0;
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ldb_message, 0);
- _v = SWIG_CheckState(res);
- if (_v) {
- int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+ int _v = 0;
+ {
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_ldb_message_element, 0);
_v = SWIG_CheckState(res);
- if (_v) {
- void *vptr = 0;
- int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_ldb_message_element, 0);
- _v = SWIG_CheckState(res);
- if (_v) {
- return _wrap_Message___setitem____SWIG_0(self, args);
- }
- }
}
+ if (!_v) goto check_1;
+ return _wrap_Message___setitem____SWIG_0(self, argc, argv);
}
+check_1:
+
if (argc == 3) {
- int _v;
- void *vptr = 0;
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ldb_message, 0);
- _v = SWIG_CheckState(res);
- if (_v) {
- int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
- _v = SWIG_CheckState(res);
- if (_v) {
- _v = (argv[2] != 0);
- if (_v) {
- return _wrap_Message___setitem____SWIG_1(self, args);
- }
- }
- }
+ return _wrap_Message___setitem____SWIG_1(self, argc, argv);
}
fail:
@@ -4096,10 +4099,11 @@ SWIGINTERN PyObject *_wrap_Message___len__(PyObject *SWIGUNUSEDPARM(self), PyObj
unsigned int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Message___len__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message___len__" "', argument " "1"" of type '" "ldb_msg *""'");
}
@@ -4123,10 +4127,11 @@ SWIGINTERN PyObject *_wrap_Message_keys(PyObject *SWIGUNUSEDPARM(self), PyObject
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Message_keys",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message_keys" "', argument " "1"" of type '" "ldb_msg *""'");
}
@@ -4150,10 +4155,11 @@ SWIGINTERN PyObject *_wrap_Message___iter__(PyObject *SWIGUNUSEDPARM(self), PyOb
PyObject *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:Message___iter__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_message, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Message___iter__" "', argument " "1"" of type '" "ldb_msg *""'");
}
@@ -4214,11 +4220,15 @@ fail:
SWIGINTERN PyObject *Message_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ldb_message, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Message_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_ldb_ldif_to_pyobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
ldb_ldif *arg1 = (ldb_ldif *) 0 ;
@@ -4371,10 +4381,11 @@ SWIGINTERN PyObject *_wrap_delete_ldb(PyObject *SWIGUNUSEDPARM(self), PyObject *
ldb *arg1 = (ldb *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_ldb",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ldb" "', argument " "1"" of type '" "ldb *""'");
}
@@ -4736,10 +4747,11 @@ SWIGINTERN PyObject *_wrap_ldb_get_config_basedn(PyObject *SWIGUNUSEDPARM(self),
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_get_config_basedn",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_get_config_basedn" "', argument " "1"" of type '" "ldb *""'");
}
@@ -4763,10 +4775,11 @@ SWIGINTERN PyObject *_wrap_ldb_get_root_basedn(PyObject *SWIGUNUSEDPARM(self), P
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_get_root_basedn",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_get_root_basedn" "', argument " "1"" of type '" "ldb *""'");
}
@@ -4790,10 +4803,11 @@ SWIGINTERN PyObject *_wrap_ldb_get_schema_basedn(PyObject *SWIGUNUSEDPARM(self),
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_get_schema_basedn",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_get_schema_basedn" "', argument " "1"" of type '" "ldb *""'");
}
@@ -4817,10 +4831,11 @@ SWIGINTERN PyObject *_wrap_ldb_get_default_basedn(PyObject *SWIGUNUSEDPARM(self)
ldb_dn *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_get_default_basedn",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_get_default_basedn" "', argument " "1"" of type '" "ldb *""'");
}
@@ -4844,10 +4859,11 @@ SWIGINTERN PyObject *_wrap_ldb_errstring(PyObject *SWIGUNUSEDPARM(self), PyObjec
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_errstring",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_errstring" "', argument " "1"" of type '" "ldb *""'");
}
@@ -5093,10 +5109,11 @@ SWIGINTERN PyObject *_wrap_ldb_transaction_start(PyObject *SWIGUNUSEDPARM(self),
ldb_error result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_transaction_start",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_transaction_start" "', argument " "1"" of type '" "ldb *""'");
}
@@ -5126,10 +5143,11 @@ SWIGINTERN PyObject *_wrap_ldb_transaction_commit(PyObject *SWIGUNUSEDPARM(self)
ldb_error result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_transaction_commit",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_transaction_commit" "', argument " "1"" of type '" "ldb *""'");
}
@@ -5159,10 +5177,11 @@ SWIGINTERN PyObject *_wrap_ldb_transaction_cancel(PyObject *SWIGUNUSEDPARM(self)
ldb_error result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:ldb_transaction_cancel",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_transaction_cancel" "', argument " "1"" of type '" "ldb *""'");
}
@@ -5289,7 +5308,7 @@ fail:
SWIGINTERN PyObject *ldb_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_ldb_context, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
@@ -5377,66 +5396,68 @@ fail:
static PyMethodDef SwigMethods[] = {
{ (char *)"new_Dn", (PyCFunction) _wrap_new_Dn, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_Dn", _wrap_delete_Dn, METH_VARARGS, NULL},
- { (char *)"Dn_validate", _wrap_Dn_validate, METH_VARARGS, NULL},
- { (char *)"Dn_get_casefold", _wrap_Dn_get_casefold, METH_VARARGS, NULL},
- { (char *)"Dn___str__", _wrap_Dn___str__, METH_VARARGS, NULL},
- { (char *)"Dn_parent", _wrap_Dn_parent, METH_VARARGS, NULL},
+ { (char *)"delete_Dn", (PyCFunction)_wrap_delete_Dn, METH_O, NULL},
+ { (char *)"Dn_validate", (PyCFunction)_wrap_Dn_validate, METH_O, NULL},
+ { (char *)"Dn_get_casefold", (PyCFunction)_wrap_Dn_get_casefold, METH_O, NULL},
+ { (char *)"Dn___str__", (PyCFunction)_wrap_Dn___str__, METH_O, NULL},
+ { (char *)"Dn_parent", (PyCFunction)_wrap_Dn_parent, METH_O, NULL},
{ (char *)"Dn___cmp__", (PyCFunction) _wrap_Dn___cmp__, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Dn_is_valid", _wrap_Dn_is_valid, METH_VARARGS, NULL},
- { (char *)"Dn_is_special", _wrap_Dn_is_special, METH_VARARGS, NULL},
- { (char *)"Dn_is_null", _wrap_Dn_is_null, METH_VARARGS, NULL},
+ { (char *)"Dn_is_valid", (PyCFunction)_wrap_Dn_is_valid, METH_O, NULL},
+ { (char *)"Dn_is_special", (PyCFunction)_wrap_Dn_is_special, METH_O, NULL},
+ { (char *)"Dn_is_null", (PyCFunction)_wrap_Dn_is_null, METH_O, NULL},
{ (char *)"Dn_check_special", (PyCFunction) _wrap_Dn_check_special, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Dn___len__", _wrap_Dn___len__, METH_VARARGS, NULL},
+ { (char *)"Dn___len__", (PyCFunction)_wrap_Dn___len__, METH_O, NULL},
{ (char *)"Dn_add_child", (PyCFunction) _wrap_Dn_add_child, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Dn_add_base", (PyCFunction) _wrap_Dn_add_base, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"Dn_canonical_str", _wrap_Dn_canonical_str, METH_VARARGS, NULL},
- { (char *)"Dn_canonical_ex_str", _wrap_Dn_canonical_ex_str, METH_VARARGS, NULL},
+ { (char *)"Dn_canonical_str", (PyCFunction)_wrap_Dn_canonical_str, METH_O, NULL},
+ { (char *)"Dn_canonical_ex_str", (PyCFunction)_wrap_Dn_canonical_ex_str, METH_O, NULL},
{ (char *)"Dn___add__", (PyCFunction) _wrap_Dn___add__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Dn_swigregister", Dn_swigregister, METH_VARARGS, NULL},
+ { (char *)"Dn_swiginit", Dn_swiginit, METH_VARARGS, NULL},
{ (char *)"ldb_dn_from_pyobject", (PyCFunction) _wrap_ldb_dn_from_pyobject, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_msg_element_from_pyobject", (PyCFunction) _wrap_ldb_msg_element_from_pyobject, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_msg_element_to_set", (PyCFunction) _wrap_ldb_msg_element_to_set, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"ldb_msg_element___iter__", _wrap_ldb_msg_element___iter__, METH_VARARGS, NULL},
- { (char *)"ldb_msg_element___set__", _wrap_ldb_msg_element___set__, METH_VARARGS, NULL},
+ { (char *)"ldb_msg_element___iter__", (PyCFunction)_wrap_ldb_msg_element___iter__, METH_O, NULL},
+ { (char *)"ldb_msg_element___set__", (PyCFunction)_wrap_ldb_msg_element___set__, METH_O, NULL},
{ (char *)"new_MessageElement", (PyCFunction) _wrap_new_MessageElement, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_ldb_msg_element", _wrap_delete_ldb_msg_element, METH_VARARGS, NULL},
+ { (char *)"delete_ldb_msg_element", (PyCFunction)_wrap_delete_ldb_msg_element, METH_O, NULL},
{ (char *)"ldb_msg_element___cmp__", (PyCFunction) _wrap_ldb_msg_element___cmp__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_msg_element_swigregister", ldb_msg_element_swigregister, METH_VARARGS, NULL},
{ (char *)"ldb_msg_list_elements", (PyCFunction) _wrap_ldb_msg_list_elements, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Message_dn_set", _wrap_Message_dn_set, METH_VARARGS, NULL},
- { (char *)"Message_dn_get", _wrap_Message_dn_get, METH_VARARGS, NULL},
+ { (char *)"Message_dn_get", (PyCFunction)_wrap_Message_dn_get, METH_O, NULL},
{ (char *)"new_Message", (PyCFunction) _wrap_new_Message, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_Message", _wrap_delete_Message, METH_VARARGS, NULL},
+ { (char *)"delete_Message", (PyCFunction)_wrap_delete_Message, METH_O, NULL},
{ (char *)"Message___getitem__", (PyCFunction) _wrap_Message___getitem__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Message___setitem__", _wrap_Message___setitem__, METH_VARARGS, NULL},
- { (char *)"Message___len__", _wrap_Message___len__, METH_VARARGS, NULL},
- { (char *)"Message_keys", _wrap_Message_keys, METH_VARARGS, NULL},
- { (char *)"Message___iter__", _wrap_Message___iter__, METH_VARARGS, NULL},
+ { (char *)"Message___len__", (PyCFunction)_wrap_Message___len__, METH_O, NULL},
+ { (char *)"Message_keys", (PyCFunction)_wrap_Message_keys, METH_O, NULL},
+ { (char *)"Message___iter__", (PyCFunction)_wrap_Message___iter__, METH_O, NULL},
{ (char *)"Message___delitem__", (PyCFunction) _wrap_Message___delitem__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Message_swigregister", Message_swigregister, METH_VARARGS, NULL},
+ { (char *)"Message_swiginit", Message_swiginit, METH_VARARGS, NULL},
{ (char *)"ldb_ldif_to_pyobject", (PyCFunction) _wrap_ldb_ldif_to_pyobject, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"new_Ldb", (PyCFunction) _wrap_new_Ldb, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_connect", (PyCFunction) _wrap_ldb_connect, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_ldb", _wrap_delete_ldb, METH_VARARGS, NULL},
+ { (char *)"delete_ldb", (PyCFunction)_wrap_delete_ldb, METH_O, NULL},
{ (char *)"ldb_search", (PyCFunction) _wrap_ldb_search, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_delete", (PyCFunction) _wrap_ldb_delete, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_rename", (PyCFunction) _wrap_ldb_rename, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_add", (PyCFunction) _wrap_ldb_add, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_modify", (PyCFunction) _wrap_ldb_modify, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"ldb_get_config_basedn", _wrap_ldb_get_config_basedn, METH_VARARGS, NULL},
- { (char *)"ldb_get_root_basedn", _wrap_ldb_get_root_basedn, METH_VARARGS, NULL},
- { (char *)"ldb_get_schema_basedn", _wrap_ldb_get_schema_basedn, METH_VARARGS, NULL},
- { (char *)"ldb_get_default_basedn", _wrap_ldb_get_default_basedn, METH_VARARGS, NULL},
- { (char *)"ldb_errstring", _wrap_ldb_errstring, METH_VARARGS, NULL},
+ { (char *)"ldb_get_config_basedn", (PyCFunction)_wrap_ldb_get_config_basedn, METH_O, NULL},
+ { (char *)"ldb_get_root_basedn", (PyCFunction)_wrap_ldb_get_root_basedn, METH_O, NULL},
+ { (char *)"ldb_get_schema_basedn", (PyCFunction)_wrap_ldb_get_schema_basedn, METH_O, NULL},
+ { (char *)"ldb_get_default_basedn", (PyCFunction)_wrap_ldb_get_default_basedn, METH_O, NULL},
+ { (char *)"ldb_errstring", (PyCFunction)_wrap_ldb_errstring, METH_O, NULL},
{ (char *)"ldb_set_create_perms", (PyCFunction) _wrap_ldb_set_create_perms, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_set_modules_dir", (PyCFunction) _wrap_ldb_set_modules_dir, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_set_debug", (PyCFunction) _wrap_ldb_set_debug, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_set_opaque", (PyCFunction) _wrap_ldb_set_opaque, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_get_opaque", (PyCFunction) _wrap_ldb_get_opaque, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"ldb_transaction_start", _wrap_ldb_transaction_start, METH_VARARGS, NULL},
- { (char *)"ldb_transaction_commit", _wrap_ldb_transaction_commit, METH_VARARGS, NULL},
- { (char *)"ldb_transaction_cancel", _wrap_ldb_transaction_cancel, METH_VARARGS, NULL},
+ { (char *)"ldb_transaction_start", (PyCFunction)_wrap_ldb_transaction_start, METH_O, NULL},
+ { (char *)"ldb_transaction_commit", (PyCFunction)_wrap_ldb_transaction_commit, METH_O, NULL},
+ { (char *)"ldb_transaction_cancel", (PyCFunction)_wrap_ldb_transaction_cancel, METH_O, NULL},
{ (char *)"ldb___contains__", (PyCFunction) _wrap_ldb___contains__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_parse_ldif", (PyCFunction) _wrap_ldb_parse_ldif, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"ldb_swigregister", ldb_swigregister, METH_VARARGS, NULL},
diff --git a/source4/lib/registry/registry.py b/source4/lib/registry/registry.py
index b61d713df8..4e3d48a18c 100644
--- a/source4/lib/registry/registry.py
+++ b/source4/lib/registry/registry.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _registry
import new
@@ -48,45 +47,43 @@ except AttributeError:
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
+
+
import credentials
reg_get_predef_name = _registry.reg_get_predef_name
str_regtype = _registry.str_regtype
Registry = _registry.Registry
-class reg(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, reg, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, reg, name)
+class reg(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
__swig_destroy__ = _registry.delete_reg
- __del__ = lambda self : None;
- def get_predefined_key_by_name(*args, **kwargs): return _registry.reg_get_predefined_key_by_name(*args, **kwargs)
- def get_predefined_key(*args, **kwargs): return _registry.reg_get_predefined_key(*args, **kwargs)
- def apply_patchfile(*args, **kwargs): return _registry.reg_apply_patchfile(*args, **kwargs)
- def mount_hive(*args, **kwargs): return _registry.reg_mount_hive(*args, **kwargs)
def mount(self, path, hkey_id, elements=[]):
self.mount_hive(Hive(path), hkey_id, elements)
def __init__(self, *args, **kwargs):
- this = _registry.new_reg(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _registry.reg_swiginit(self,_registry.new_reg(*args, **kwargs))
+reg.get_predefined_key_by_name = new_instancemethod(_registry.reg_get_predefined_key_by_name,None,reg)
+reg.get_predefined_key = new_instancemethod(_registry.reg_get_predefined_key,None,reg)
+reg.apply_patchfile = new_instancemethod(_registry.reg_apply_patchfile,None,reg)
+reg.mount_hive = new_instancemethod(_registry.reg_mount_hive,None,reg)
reg_swigregister = _registry.reg_swigregister
reg_swigregister(reg)
Hive = _registry.Hive
-class hive(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, hive, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, hive, name)
+class hive(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
__swig_destroy__ = _registry.delete_hive
- __del__ = lambda self : None;
def __init__(self, *args, **kwargs):
- this = _registry.new_hive(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _registry.hive_swiginit(self,_registry.new_hive(*args, **kwargs))
hive_swigregister = _registry.hive_swigregister
hive_swigregister(hive)
diff --git a/source4/lib/registry/registry_wrap.c b/source4/lib/registry/registry_wrap.c
index 3ab0af10b5..15c27a8f6c 100644
--- a/source4/lib/registry/registry_wrap.c
+++ b/source4/lib/registry/registry_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2487,6 +2487,19 @@ static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _registry.so
@@ -2954,10 +2967,11 @@ SWIGINTERN PyObject *_wrap_delete_reg(PyObject *SWIGUNUSEDPARM(self), PyObject *
reg *arg1 = (reg *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_reg",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_registry_context, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_registry_context, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_reg" "', argument " "1"" of type '" "reg *""'");
}
@@ -3204,7 +3218,7 @@ SWIGINTERN PyObject *_wrap_new_reg(PyObject *SWIGUNUSEDPARM(self), PyObject *arg
PyObject *resultobj = 0;
reg *result = 0 ;
- if (!PyArg_ParseTuple(args,(char *)":new_reg")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_reg",0,0,0)) SWIG_fail;
result = (reg *)(reg *) calloc(1, sizeof(reg));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_registry_context, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3215,11 +3229,15 @@ fail:
SWIGINTERN PyObject *reg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_registry_context, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *reg_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_Hive(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3301,10 +3319,11 @@ SWIGINTERN PyObject *_wrap_delete_hive(PyObject *SWIGUNUSEDPARM(self), PyObject
hive *arg1 = (hive *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_hive",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_hive_key, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hive_key, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_hive" "', argument " "1"" of type '" "hive *""'");
}
@@ -3322,7 +3341,7 @@ SWIGINTERN PyObject *_wrap_new_hive(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
PyObject *resultobj = 0;
hive *result = 0 ;
- if (!PyArg_ParseTuple(args,(char *)":new_hive")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_hive",0,0,0)) SWIG_fail;
result = (hive *)(hive *) calloc(1, sizeof(hive));
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hive_key, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3333,11 +3352,15 @@ fail:
SWIGINTERN PyObject *hive_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_hive_key, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *hive_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_open_samba(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3414,17 +3437,19 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"reg_get_predef_name", (PyCFunction) _wrap_reg_get_predef_name, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"str_regtype", (PyCFunction) _wrap_str_regtype, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Registry", (PyCFunction) _wrap_Registry, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_reg", _wrap_delete_reg, METH_VARARGS, NULL},
+ { (char *)"delete_reg", (PyCFunction)_wrap_delete_reg, METH_O, NULL},
{ (char *)"reg_get_predefined_key_by_name", (PyCFunction) _wrap_reg_get_predefined_key_by_name, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"reg_get_predefined_key", (PyCFunction) _wrap_reg_get_predefined_key, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"reg_apply_patchfile", (PyCFunction) _wrap_reg_apply_patchfile, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"reg_mount_hive", (PyCFunction) _wrap_reg_mount_hive, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"new_reg", _wrap_new_reg, METH_VARARGS, NULL},
+ { (char *)"new_reg", (PyCFunction)_wrap_new_reg, METH_NOARGS, NULL},
{ (char *)"reg_swigregister", reg_swigregister, METH_VARARGS, NULL},
+ { (char *)"reg_swiginit", reg_swiginit, METH_VARARGS, NULL},
{ (char *)"Hive", (PyCFunction) _wrap_Hive, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_hive", _wrap_delete_hive, METH_VARARGS, NULL},
- { (char *)"new_hive", _wrap_new_hive, METH_VARARGS, NULL},
+ { (char *)"delete_hive", (PyCFunction)_wrap_delete_hive, METH_O, NULL},
+ { (char *)"new_hive", (PyCFunction)_wrap_new_hive, METH_NOARGS, NULL},
{ (char *)"hive_swigregister", hive_swigregister, METH_VARARGS, NULL},
+ { (char *)"hive_swiginit", hive_swiginit, METH_VARARGS, NULL},
{ (char *)"open_samba", (PyCFunction) _wrap_open_samba, METH_VARARGS | METH_KEYWORDS, NULL},
{ NULL, NULL, 0, NULL }
};
diff --git a/source4/lib/tdb/tdb.py b/source4/lib/tdb/tdb.py
index 1105291099..d4cf9f5c6f 100644
--- a/source4/lib/tdb/tdb.py
+++ b/source4/lib/tdb/tdb.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _tdb
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
REPLACE = _tdb.REPLACE
INSERT = _tdb.INSERT
MODIFY = _tdb.MODIFY
@@ -69,39 +78,11 @@ TDB_ERR_LOCK_TIMEOUT = _tdb.TDB_ERR_LOCK_TIMEOUT
TDB_ERR_NOEXIST = _tdb.TDB_ERR_NOEXIST
TDB_ERR_EINVAL = _tdb.TDB_ERR_EINVAL
TDB_ERR_RDONLY = _tdb.TDB_ERR_RDONLY
-class tdb(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, tdb, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, tdb, name)
+class tdb(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self): raise AttributeError, "No constructor defined"
__repr__ = _swig_repr
- def error(*args, **kwargs): return _tdb.tdb_error(*args, **kwargs)
__swig_destroy__ = _tdb.delete_tdb
- __del__ = lambda self : None;
- def close(*args, **kwargs): return _tdb.tdb_close(*args, **kwargs)
- def append(*args, **kwargs): return _tdb.tdb_append(*args, **kwargs)
- def errorstr(*args, **kwargs): return _tdb.tdb_errorstr(*args, **kwargs)
- def fetch(*args, **kwargs): return _tdb.tdb_fetch(*args, **kwargs)
- def delete(*args, **kwargs): return _tdb.tdb_delete(*args, **kwargs)
- def store(*args, **kwargs): return _tdb.tdb_store(*args, **kwargs)
- def exists(*args, **kwargs): return _tdb.tdb_exists(*args, **kwargs)
- def firstkey(*args, **kwargs): return _tdb.tdb_firstkey(*args, **kwargs)
- def nextkey(*args, **kwargs): return _tdb.tdb_nextkey(*args, **kwargs)
- def lock_all(*args, **kwargs): return _tdb.tdb_lock_all(*args, **kwargs)
- def unlock_all(*args, **kwargs): return _tdb.tdb_unlock_all(*args, **kwargs)
- def read_lock_all(*args, **kwargs): return _tdb.tdb_read_lock_all(*args, **kwargs)
- def read_unlock_all(*args, **kwargs): return _tdb.tdb_read_unlock_all(*args, **kwargs)
- def reopen(*args, **kwargs): return _tdb.tdb_reopen(*args, **kwargs)
- def transaction_start(*args, **kwargs): return _tdb.tdb_transaction_start(*args, **kwargs)
- def transaction_commit(*args, **kwargs): return _tdb.tdb_transaction_commit(*args, **kwargs)
- def transaction_cancel(*args, **kwargs): return _tdb.tdb_transaction_cancel(*args, **kwargs)
- def transaction_recover(*args, **kwargs): return _tdb.tdb_transaction_recover(*args, **kwargs)
- def hash_size(*args, **kwargs): return _tdb.tdb_hash_size(*args, **kwargs)
- def map_size(*args, **kwargs): return _tdb.tdb_map_size(*args, **kwargs)
- def get_flags(*args, **kwargs): return _tdb.tdb_get_flags(*args, **kwargs)
- def set_max_dead(*args, **kwargs): return _tdb.tdb_set_max_dead(*args, **kwargs)
- def name(*args, **kwargs): return _tdb.tdb_name(*args, **kwargs)
def __str__(self):
return self.name()
@@ -173,6 +154,30 @@ class tdb(_object):
+tdb.error = new_instancemethod(_tdb.tdb_error,None,tdb)
+tdb.close = new_instancemethod(_tdb.tdb_close,None,tdb)
+tdb.append = new_instancemethod(_tdb.tdb_append,None,tdb)
+tdb.errorstr = new_instancemethod(_tdb.tdb_errorstr,None,tdb)
+tdb.fetch = new_instancemethod(_tdb.tdb_fetch,None,tdb)
+tdb.delete = new_instancemethod(_tdb.tdb_delete,None,tdb)
+tdb.store = new_instancemethod(_tdb.tdb_store,None,tdb)
+tdb.exists = new_instancemethod(_tdb.tdb_exists,None,tdb)
+tdb.firstkey = new_instancemethod(_tdb.tdb_firstkey,None,tdb)
+tdb.nextkey = new_instancemethod(_tdb.tdb_nextkey,None,tdb)
+tdb.lock_all = new_instancemethod(_tdb.tdb_lock_all,None,tdb)
+tdb.unlock_all = new_instancemethod(_tdb.tdb_unlock_all,None,tdb)
+tdb.read_lock_all = new_instancemethod(_tdb.tdb_read_lock_all,None,tdb)
+tdb.read_unlock_all = new_instancemethod(_tdb.tdb_read_unlock_all,None,tdb)
+tdb.reopen = new_instancemethod(_tdb.tdb_reopen,None,tdb)
+tdb.transaction_start = new_instancemethod(_tdb.tdb_transaction_start,None,tdb)
+tdb.transaction_commit = new_instancemethod(_tdb.tdb_transaction_commit,None,tdb)
+tdb.transaction_cancel = new_instancemethod(_tdb.tdb_transaction_cancel,None,tdb)
+tdb.transaction_recover = new_instancemethod(_tdb.tdb_transaction_recover,None,tdb)
+tdb.hash_size = new_instancemethod(_tdb.tdb_hash_size,None,tdb)
+tdb.map_size = new_instancemethod(_tdb.tdb_map_size,None,tdb)
+tdb.get_flags = new_instancemethod(_tdb.tdb_get_flags,None,tdb)
+tdb.set_max_dead = new_instancemethod(_tdb.tdb_set_max_dead,None,tdb)
+tdb.name = new_instancemethod(_tdb.tdb_name,None,tdb)
tdb_swigregister = _tdb.tdb_swigregister
tdb_swigregister(tdb)
diff --git a/source4/lib/tdb/tdb_wrap.c b/source4/lib/tdb/tdb_wrap.c
index b9660c3428..841cd78399 100644
--- a/source4/lib/tdb/tdb_wrap.c
+++ b/source4/lib/tdb/tdb_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2479,6 +2479,19 @@ static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _tdb.so
@@ -2880,10 +2893,11 @@ SWIGINTERN PyObject *_wrap_tdb_error(PyObject *SWIGUNUSEDPARM(self), PyObject *a
enum TDB_ERROR result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_error",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_error" "', argument " "1"" of type '" "tdb *""'");
}
@@ -2901,10 +2915,11 @@ SWIGINTERN PyObject *_wrap_delete_tdb(PyObject *SWIGUNUSEDPARM(self), PyObject *
tdb *arg1 = (tdb *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_tdb",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tdb" "', argument " "1"" of type '" "tdb *""'");
}
@@ -2924,10 +2939,11 @@ SWIGINTERN PyObject *_wrap_tdb_close(PyObject *SWIGUNUSEDPARM(self), PyObject *a
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_close",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_close" "', argument " "1"" of type '" "tdb *""'");
}
@@ -2991,10 +3007,11 @@ SWIGINTERN PyObject *_wrap_tdb_errorstr(PyObject *SWIGUNUSEDPARM(self), PyObject
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_errorstr",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_errorstr" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3184,10 +3201,11 @@ SWIGINTERN PyObject *_wrap_tdb_firstkey(PyObject *SWIGUNUSEDPARM(self), PyObject
TDB_DATA result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_firstkey",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_firstkey" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3255,10 +3273,11 @@ SWIGINTERN PyObject *_wrap_tdb_lock_all(PyObject *SWIGUNUSEDPARM(self), PyObject
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_lock_all",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_lock_all" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3277,10 +3296,11 @@ SWIGINTERN PyObject *_wrap_tdb_unlock_all(PyObject *SWIGUNUSEDPARM(self), PyObje
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_unlock_all",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_unlock_all" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3299,10 +3319,11 @@ SWIGINTERN PyObject *_wrap_tdb_read_lock_all(PyObject *SWIGUNUSEDPARM(self), PyO
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_read_lock_all",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_read_lock_all" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3321,10 +3342,11 @@ SWIGINTERN PyObject *_wrap_tdb_read_unlock_all(PyObject *SWIGUNUSEDPARM(self), P
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_read_unlock_all",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_read_unlock_all" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3343,10 +3365,11 @@ SWIGINTERN PyObject *_wrap_tdb_reopen(PyObject *SWIGUNUSEDPARM(self), PyObject *
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_reopen",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_reopen" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3365,10 +3388,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_start(PyObject *SWIGUNUSEDPARM(self),
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_start",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_start" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3387,10 +3411,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_commit(PyObject *SWIGUNUSEDPARM(self)
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_commit",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_commit" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3409,10 +3434,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_cancel(PyObject *SWIGUNUSEDPARM(self)
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_cancel",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_cancel" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3431,10 +3457,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_recover(PyObject *SWIGUNUSEDPARM(self
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_recover",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_recover" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3453,10 +3480,11 @@ SWIGINTERN PyObject *_wrap_tdb_hash_size(PyObject *SWIGUNUSEDPARM(self), PyObjec
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_hash_size",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_hash_size" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3475,10 +3503,11 @@ SWIGINTERN PyObject *_wrap_tdb_map_size(PyObject *SWIGUNUSEDPARM(self), PyObject
size_t result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_map_size",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_map_size" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3497,10 +3526,11 @@ SWIGINTERN PyObject *_wrap_tdb_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObjec
int result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_get_flags",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_get_flags" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3552,10 +3582,11 @@ SWIGINTERN PyObject *_wrap_tdb_name(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:tdb_name",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_name" "', argument " "1"" of type '" "tdb *""'");
}
@@ -3570,38 +3601,38 @@ fail:
SWIGINTERN PyObject *tdb_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_tdb_context, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
static PyMethodDef SwigMethods[] = {
{ (char *)"new_Tdb", (PyCFunction) _wrap_new_Tdb, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"tdb_error", _wrap_tdb_error, METH_VARARGS, NULL},
- { (char *)"delete_tdb", _wrap_delete_tdb, METH_VARARGS, NULL},
- { (char *)"tdb_close", _wrap_tdb_close, METH_VARARGS, NULL},
+ { (char *)"tdb_error", (PyCFunction)_wrap_tdb_error, METH_O, NULL},
+ { (char *)"delete_tdb", (PyCFunction)_wrap_delete_tdb, METH_O, NULL},
+ { (char *)"tdb_close", (PyCFunction)_wrap_tdb_close, METH_O, NULL},
{ (char *)"tdb_append", (PyCFunction) _wrap_tdb_append, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"tdb_errorstr", _wrap_tdb_errorstr, METH_VARARGS, NULL},
+ { (char *)"tdb_errorstr", (PyCFunction)_wrap_tdb_errorstr, METH_O, NULL},
{ (char *)"tdb_fetch", (PyCFunction) _wrap_tdb_fetch, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"tdb_delete", (PyCFunction) _wrap_tdb_delete, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"tdb_store", (PyCFunction) _wrap_tdb_store, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"tdb_exists", (PyCFunction) _wrap_tdb_exists, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"tdb_firstkey", _wrap_tdb_firstkey, METH_VARARGS, NULL},
+ { (char *)"tdb_firstkey", (PyCFunction)_wrap_tdb_firstkey, METH_O, NULL},
{ (char *)"tdb_nextkey", (PyCFunction) _wrap_tdb_nextkey, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"tdb_lock_all", _wrap_tdb_lock_all, METH_VARARGS, NULL},
- { (char *)"tdb_unlock_all", _wrap_tdb_unlock_all, METH_VARARGS, NULL},
- { (char *)"tdb_read_lock_all", _wrap_tdb_read_lock_all, METH_VARARGS, NULL},
- { (char *)"tdb_read_unlock_all", _wrap_tdb_read_unlock_all, METH_VARARGS, NULL},
- { (char *)"tdb_reopen", _wrap_tdb_reopen, METH_VARARGS, NULL},
- { (char *)"tdb_transaction_start", _wrap_tdb_transaction_start, METH_VARARGS, NULL},
- { (char *)"tdb_transaction_commit", _wrap_tdb_transaction_commit, METH_VARARGS, NULL},
- { (char *)"tdb_transaction_cancel", _wrap_tdb_transaction_cancel, METH_VARARGS, NULL},
- { (char *)"tdb_transaction_recover", _wrap_tdb_transaction_recover, METH_VARARGS, NULL},
- { (char *)"tdb_hash_size", _wrap_tdb_hash_size, METH_VARARGS, NULL},
- { (char *)"tdb_map_size", _wrap_tdb_map_size, METH_VARARGS, NULL},
- { (char *)"tdb_get_flags", _wrap_tdb_get_flags, METH_VARARGS, NULL},
+ { (char *)"tdb_lock_all", (PyCFunction)_wrap_tdb_lock_all, METH_O, NULL},
+ { (char *)"tdb_unlock_all", (PyCFunction)_wrap_tdb_unlock_all, METH_O, NULL},
+ { (char *)"tdb_read_lock_all", (PyCFunction)_wrap_tdb_read_lock_all, METH_O, NULL},
+ { (char *)"tdb_read_unlock_all", (PyCFunction)_wrap_tdb_read_unlock_all, METH_O, NULL},
+ { (char *)"tdb_reopen", (PyCFunction)_wrap_tdb_reopen, METH_O, NULL},
+ { (char *)"tdb_transaction_start", (PyCFunction)_wrap_tdb_transaction_start, METH_O, NULL},
+ { (char *)"tdb_transaction_commit", (PyCFunction)_wrap_tdb_transaction_commit, METH_O, NULL},
+ { (char *)"tdb_transaction_cancel", (PyCFunction)_wrap_tdb_transaction_cancel, METH_O, NULL},
+ { (char *)"tdb_transaction_recover", (PyCFunction)_wrap_tdb_transaction_recover, METH_O, NULL},
+ { (char *)"tdb_hash_size", (PyCFunction)_wrap_tdb_hash_size, METH_O, NULL},
+ { (char *)"tdb_map_size", (PyCFunction)_wrap_tdb_map_size, METH_O, NULL},
+ { (char *)"tdb_get_flags", (PyCFunction)_wrap_tdb_get_flags, METH_O, NULL},
{ (char *)"tdb_set_max_dead", (PyCFunction) _wrap_tdb_set_max_dead, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"tdb_name", _wrap_tdb_name, METH_VARARGS, NULL},
+ { (char *)"tdb_name", (PyCFunction)_wrap_tdb_name, METH_O, NULL},
{ (char *)"tdb_swigregister", tdb_swigregister, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL }
};
diff --git a/source4/libcli/security/security.py b/source4/libcli/security/security.py
index 6b69251b4a..10b263b27b 100644
--- a/source4/libcli/security/security.py
+++ b/source4/libcli/security/security.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _security
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
SEC_PRIV_SECURITY = _security.SEC_PRIV_SECURITY
SEC_PRIV_BACKUP = _security.SEC_PRIV_BACKUP
SEC_PRIV_RESTORE = _security.SEC_PRIV_RESTORE
@@ -72,63 +81,45 @@ SEC_PRIV_ENABLE_DELEGATION = _security.SEC_PRIV_ENABLE_DELEGATION
SEC_PRIV_INTERACTIVE_LOGON = _security.SEC_PRIV_INTERACTIVE_LOGON
SEC_PRIV_NETWORK_LOGON = _security.SEC_PRIV_NETWORK_LOGON
SEC_PRIV_REMOTE_INTERACTIVE_LOGON = _security.SEC_PRIV_REMOTE_INTERACTIVE_LOGON
-class SecurityToken(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, SecurityToken, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, SecurityToken, name)
+class SecurityToken(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _security.new_SecurityToken(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _security.SecurityToken_swiginit(self,_security.new_SecurityToken(*args, **kwargs))
__swig_destroy__ = _security.delete_SecurityToken
- __del__ = lambda self : None;
- def is_sid(*args, **kwargs): return _security.SecurityToken_is_sid(*args, **kwargs)
- def is_system(*args, **kwargs): return _security.SecurityToken_is_system(*args, **kwargs)
- def is_anonymous(*args, **kwargs): return _security.SecurityToken_is_anonymous(*args, **kwargs)
- def has_sid(*args, **kwargs): return _security.SecurityToken_has_sid(*args, **kwargs)
- def has_builtin_administrators(*args, **kwargs): return _security.SecurityToken_has_builtin_administrators(*args, **kwargs)
- def has_nt_authenticated_users(*args, **kwargs): return _security.SecurityToken_has_nt_authenticated_users(*args, **kwargs)
- def has_privilege(*args, **kwargs): return _security.SecurityToken_has_privilege(*args, **kwargs)
- def set_privilege(*args, **kwargs): return _security.SecurityToken_set_privilege(*args, **kwargs)
+SecurityToken.is_sid = new_instancemethod(_security.SecurityToken_is_sid,None,SecurityToken)
+SecurityToken.is_system = new_instancemethod(_security.SecurityToken_is_system,None,SecurityToken)
+SecurityToken.is_anonymous = new_instancemethod(_security.SecurityToken_is_anonymous,None,SecurityToken)
+SecurityToken.has_sid = new_instancemethod(_security.SecurityToken_has_sid,None,SecurityToken)
+SecurityToken.has_builtin_administrators = new_instancemethod(_security.SecurityToken_has_builtin_administrators,None,SecurityToken)
+SecurityToken.has_nt_authenticated_users = new_instancemethod(_security.SecurityToken_has_nt_authenticated_users,None,SecurityToken)
+SecurityToken.has_privilege = new_instancemethod(_security.SecurityToken_has_privilege,None,SecurityToken)
+SecurityToken.set_privilege = new_instancemethod(_security.SecurityToken_set_privilege,None,SecurityToken)
SecurityToken_swigregister = _security.SecurityToken_swigregister
SecurityToken_swigregister(SecurityToken)
-class security_descriptor(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, security_descriptor, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, security_descriptor, name)
+class security_descriptor(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _security.new_security_descriptor(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _security.security_descriptor_swiginit(self,_security.new_security_descriptor(*args, **kwargs))
__swig_destroy__ = _security.delete_security_descriptor
- __del__ = lambda self : None;
- def sacl_add(*args, **kwargs): return _security.security_descriptor_sacl_add(*args, **kwargs)
- def dacl_add(*args, **kwargs): return _security.security_descriptor_dacl_add(*args, **kwargs)
- def dacl_del(*args, **kwargs): return _security.security_descriptor_dacl_del(*args, **kwargs)
- def sacl_del(*args, **kwargs): return _security.security_descriptor_sacl_del(*args, **kwargs)
- def __eq__(*args, **kwargs): return _security.security_descriptor___eq__(*args, **kwargs)
+security_descriptor.sacl_add = new_instancemethod(_security.security_descriptor_sacl_add,None,security_descriptor)
+security_descriptor.dacl_add = new_instancemethod(_security.security_descriptor_dacl_add,None,security_descriptor)
+security_descriptor.dacl_del = new_instancemethod(_security.security_descriptor_dacl_del,None,security_descriptor)
+security_descriptor.sacl_del = new_instancemethod(_security.security_descriptor_sacl_del,None,security_descriptor)
+security_descriptor.__eq__ = new_instancemethod(_security.security_descriptor___eq__,None,security_descriptor)
security_descriptor_swigregister = _security.security_descriptor_swigregister
security_descriptor_swigregister(security_descriptor)
-class Sid(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Sid, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Sid, name)
+class Sid(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _security.new_Sid(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _security.Sid_swiginit(self,_security.new_Sid(*args, **kwargs))
__swig_destroy__ = _security.delete_Sid
- __del__ = lambda self : None;
- def __str__(*args, **kwargs): return _security.Sid___str__(*args, **kwargs)
- def __eq__(*args, **kwargs): return _security.Sid___eq__(*args, **kwargs)
+Sid.__str__ = new_instancemethod(_security.Sid___str__,None,Sid)
+Sid.__eq__ = new_instancemethod(_security.Sid___eq__,None,Sid)
Sid_swigregister = _security.Sid_swigregister
Sid_swigregister(Sid)
diff --git a/source4/libcli/security/security_wrap.c b/source4/libcli/security/security_wrap.c
index b9f9157012..633537f951 100644
--- a/source4/libcli/security/security_wrap.c
+++ b/source4/libcli/security/security_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2482,6 +2482,19 @@ static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _security.so
@@ -2792,7 +2805,7 @@ SWIGINTERN PyObject *_wrap_new_SecurityToken(PyObject *SWIGUNUSEDPARM(self), PyO
{
arg1 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)":new_SecurityToken")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_SecurityToken",0,0,0)) SWIG_fail;
result = (security_token *)new_security_token(arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_token, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -2806,10 +2819,11 @@ SWIGINTERN PyObject *_wrap_delete_SecurityToken(PyObject *SWIGUNUSEDPARM(self),
security_token *arg1 = (security_token *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_SecurityToken",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_token, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_token, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SecurityToken" "', argument " "1"" of type '" "security_token *""'");
}
@@ -2863,10 +2877,11 @@ SWIGINTERN PyObject *_wrap_SecurityToken_is_system(PyObject *SWIGUNUSEDPARM(self
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:SecurityToken_is_system",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_token, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_token, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SecurityToken_is_system" "', argument " "1"" of type '" "security_token *""'");
}
@@ -2885,10 +2900,11 @@ SWIGINTERN PyObject *_wrap_SecurityToken_is_anonymous(PyObject *SWIGUNUSEDPARM(s
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:SecurityToken_is_anonymous",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_token, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_token, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SecurityToken_is_anonymous" "', argument " "1"" of type '" "security_token *""'");
}
@@ -2941,10 +2957,11 @@ SWIGINTERN PyObject *_wrap_SecurityToken_has_builtin_administrators(PyObject *SW
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:SecurityToken_has_builtin_administrators",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_token, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_token, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SecurityToken_has_builtin_administrators" "', argument " "1"" of type '" "security_token *""'");
}
@@ -2963,10 +2980,11 @@ SWIGINTERN PyObject *_wrap_SecurityToken_has_nt_authenticated_users(PyObject *SW
bool result;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:SecurityToken_has_nt_authenticated_users",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_token, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_token, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SecurityToken_has_nt_authenticated_users" "', argument " "1"" of type '" "security_token *""'");
}
@@ -3048,11 +3066,15 @@ fail:
SWIGINTERN PyObject *SecurityToken_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_security_token, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *SecurityToken_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_new_security_descriptor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3061,7 +3083,7 @@ SWIGINTERN PyObject *_wrap_new_security_descriptor(PyObject *SWIGUNUSEDPARM(self
{
arg1 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)":new_security_descriptor")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_security_descriptor",0,0,0)) SWIG_fail;
result = (security_descriptor *)new_security_descriptor(arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_descriptor, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3075,10 +3097,11 @@ SWIGINTERN PyObject *_wrap_delete_security_descriptor(PyObject *SWIGUNUSEDPARM(s
security_descriptor *arg1 = (security_descriptor *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_security_descriptor",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_descriptor, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_security_descriptor, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_security_descriptor" "', argument " "1"" of type '" "security_descriptor *""'");
}
@@ -3292,11 +3315,15 @@ fail:
SWIGINTERN PyObject *security_descriptor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_security_descriptor, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *security_descriptor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_new_Sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3334,10 +3361,11 @@ SWIGINTERN PyObject *_wrap_delete_Sid(PyObject *SWIGUNUSEDPARM(self), PyObject *
dom_sid *arg1 = (dom_sid *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
- if (!PyArg_ParseTuple(args,(char *)"O:delete_Sid",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dom_sid, SWIG_POINTER_DISOWN | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sid" "', argument " "1"" of type '" "dom_sid *""'");
}
@@ -3358,13 +3386,14 @@ SWIGINTERN PyObject *_wrap_Sid___str__(PyObject *SWIGUNUSEDPARM(self), PyObject
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
- PyObject * obj0 = 0 ;
+ PyObject *swig_obj[1] ;
{
arg2 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)"O:Sid___str__",&obj0)) SWIG_fail;
- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sid___str__" "', argument " "1"" of type '" "dom_sid *""'");
}
@@ -3413,11 +3442,15 @@ fail:
SWIGINTERN PyObject *Sid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_dom_sid, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Sid_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_random_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3426,7 +3459,7 @@ SWIGINTERN PyObject *_wrap_random_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *
{
arg1 = NULL;
}
- if (!PyArg_ParseTuple(args,(char *)":random_sid")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"random_sid",0,0,0)) SWIG_fail;
result = (struct dom_sid *)random_sid(arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_dom_sid, 0 | 0 );
return resultobj;
@@ -3489,31 +3522,34 @@ fail:
static PyMethodDef SwigMethods[] = {
- { (char *)"new_SecurityToken", _wrap_new_SecurityToken, METH_VARARGS, NULL},
- { (char *)"delete_SecurityToken", _wrap_delete_SecurityToken, METH_VARARGS, NULL},
+ { (char *)"new_SecurityToken", (PyCFunction)_wrap_new_SecurityToken, METH_NOARGS, NULL},
+ { (char *)"delete_SecurityToken", (PyCFunction)_wrap_delete_SecurityToken, METH_O, NULL},
{ (char *)"SecurityToken_is_sid", (PyCFunction) _wrap_SecurityToken_is_sid, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"SecurityToken_is_system", _wrap_SecurityToken_is_system, METH_VARARGS, NULL},
- { (char *)"SecurityToken_is_anonymous", _wrap_SecurityToken_is_anonymous, METH_VARARGS, NULL},
+ { (char *)"SecurityToken_is_system", (PyCFunction)_wrap_SecurityToken_is_system, METH_O, NULL},
+ { (char *)"SecurityToken_is_anonymous", (PyCFunction)_wrap_SecurityToken_is_anonymous, METH_O, NULL},
{ (char *)"SecurityToken_has_sid", (PyCFunction) _wrap_SecurityToken_has_sid, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"SecurityToken_has_builtin_administrators", _wrap_SecurityToken_has_builtin_administrators, METH_VARARGS, NULL},
- { (char *)"SecurityToken_has_nt_authenticated_users", _wrap_SecurityToken_has_nt_authenticated_users, METH_VARARGS, NULL},
+ { (char *)"SecurityToken_has_builtin_administrators", (PyCFunction)_wrap_SecurityToken_has_builtin_administrators, METH_O, NULL},
+ { (char *)"SecurityToken_has_nt_authenticated_users", (PyCFunction)_wrap_SecurityToken_has_nt_authenticated_users, METH_O, NULL},
{ (char *)"SecurityToken_has_privilege", (PyCFunction) _wrap_SecurityToken_has_privilege, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"SecurityToken_set_privilege", (PyCFunction) _wrap_SecurityToken_set_privilege, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"SecurityToken_swigregister", SecurityToken_swigregister, METH_VARARGS, NULL},
- { (char *)"new_security_descriptor", _wrap_new_security_descriptor, METH_VARARGS, NULL},
- { (char *)"delete_security_descriptor", _wrap_delete_security_descriptor, METH_VARARGS, NULL},
+ { (char *)"SecurityToken_swiginit", SecurityToken_swiginit, METH_VARARGS, NULL},
+ { (char *)"new_security_descriptor", (PyCFunction)_wrap_new_security_descriptor, METH_NOARGS, NULL},
+ { (char *)"delete_security_descriptor", (PyCFunction)_wrap_delete_security_descriptor, METH_O, NULL},
{ (char *)"security_descriptor_sacl_add", (PyCFunction) _wrap_security_descriptor_sacl_add, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"security_descriptor_dacl_add", (PyCFunction) _wrap_security_descriptor_dacl_add, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"security_descriptor_dacl_del", (PyCFunction) _wrap_security_descriptor_dacl_del, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"security_descriptor_sacl_del", (PyCFunction) _wrap_security_descriptor_sacl_del, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"security_descriptor___eq__", (PyCFunction) _wrap_security_descriptor___eq__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"security_descriptor_swigregister", security_descriptor_swigregister, METH_VARARGS, NULL},
+ { (char *)"security_descriptor_swiginit", security_descriptor_swiginit, METH_VARARGS, NULL},
{ (char *)"new_Sid", (PyCFunction) _wrap_new_Sid, METH_VARARGS | METH_KEYWORDS, NULL},
- { (char *)"delete_Sid", _wrap_delete_Sid, METH_VARARGS, NULL},
- { (char *)"Sid___str__", _wrap_Sid___str__, METH_VARARGS, NULL},
+ { (char *)"delete_Sid", (PyCFunction)_wrap_delete_Sid, METH_O, NULL},
+ { (char *)"Sid___str__", (PyCFunction)_wrap_Sid___str__, METH_O, NULL},
{ (char *)"Sid___eq__", (PyCFunction) _wrap_Sid___eq__, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Sid_swigregister", Sid_swigregister, METH_VARARGS, NULL},
- { (char *)"random_sid", _wrap_random_sid, METH_VARARGS, NULL},
+ { (char *)"Sid_swiginit", Sid_swiginit, METH_VARARGS, NULL},
+ { (char *)"random_sid", (PyCFunction)_wrap_random_sid, METH_NOARGS, NULL},
{ (char *)"privilege_name", (PyCFunction) _wrap_privilege_name, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"privilege_id", (PyCFunction) _wrap_privilege_id, METH_VARARGS | METH_KEYWORDS, NULL},
{ NULL, NULL, 0, NULL }
diff --git a/source4/librpc/rpc/dcerpc.py b/source4/librpc/rpc/dcerpc.py
index b2edb17f33..da3664d80e 100644
--- a/source4/librpc/rpc/dcerpc.py
+++ b/source4/librpc/rpc/dcerpc.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _dcerpc
import new
@@ -48,36 +47,40 @@ except AttributeError:
del types
-class Credentials(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Credentials, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Credentials, name)
+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
+
+
+class Credentials(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _dcerpc.new_Credentials(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _dcerpc.Credentials_swiginit(self,_dcerpc.new_Credentials(*args, **kwargs))
__swig_destroy__ = _dcerpc.delete_Credentials
- __del__ = lambda self : None;
- def get_username(*args, **kwargs): return _dcerpc.Credentials_get_username(*args, **kwargs)
- def set_username(*args, **kwargs): return _dcerpc.Credentials_set_username(*args, **kwargs)
- def get_password(*args, **kwargs): return _dcerpc.Credentials_get_password(*args, **kwargs)
- def set_password(*args, **kwargs): return _dcerpc.Credentials_set_password(*args, **kwargs)
- def get_domain(*args, **kwargs): return _dcerpc.Credentials_get_domain(*args, **kwargs)
- def set_domain(*args, **kwargs): return _dcerpc.Credentials_set_domain(*args, **kwargs)
- def get_realm(*args, **kwargs): return _dcerpc.Credentials_get_realm(*args, **kwargs)
- def set_realm(*args, **kwargs): return _dcerpc.Credentials_set_realm(*args, **kwargs)
- def parse_string(*args, **kwargs): return _dcerpc.Credentials_parse_string(*args, **kwargs)
- def get_bind_dn(*args, **kwargs): return _dcerpc.Credentials_get_bind_dn(*args, **kwargs)
- def set_bind_dn(*args, **kwargs): return _dcerpc.Credentials_set_bind_dn(*args, **kwargs)
- def get_workstation(*args, **kwargs): return _dcerpc.Credentials_get_workstation(*args, **kwargs)
- def set_workstation(*args, **kwargs): return _dcerpc.Credentials_set_workstation(*args, **kwargs)
- def guess(*args, **kwargs): return _dcerpc.Credentials_guess(*args, **kwargs)
- def is_anonymous(*args, **kwargs): return _dcerpc.Credentials_is_anonymous(*args, **kwargs)
- def get_nt_hash(*args, **kwargs): return _dcerpc.Credentials_get_nt_hash(*args, **kwargs)
- def authentication_requested(*args, **kwargs): return _dcerpc.Credentials_authentication_requested(*args, **kwargs)
- def wrong_password(*args, **kwargs): return _dcerpc.Credentials_wrong_password(*args, **kwargs)
+Credentials.get_username = new_instancemethod(_dcerpc.Credentials_get_username,None,Credentials)
+Credentials.set_username = new_instancemethod(_dcerpc.Credentials_set_username,None,Credentials)
+Credentials.get_password = new_instancemethod(_dcerpc.Credentials_get_password,None,Credentials)
+Credentials.set_password = new_instancemethod(_dcerpc.Credentials_set_password,None,Credentials)
+Credentials.get_domain = new_instancemethod(_dcerpc.Credentials_get_domain,None,Credentials)
+Credentials.set_domain = new_instancemethod(_dcerpc.Credentials_set_domain,None,Credentials)
+Credentials.get_realm = new_instancemethod(_dcerpc.Credentials_get_realm,None,Credentials)
+Credentials.set_realm = new_instancemethod(_dcerpc.Credentials_set_realm,None,Credentials)
+Credentials.parse_string = new_instancemethod(_dcerpc.Credentials_parse_string,None,Credentials)
+Credentials.get_bind_dn = new_instancemethod(_dcerpc.Credentials_get_bind_dn,None,Credentials)
+Credentials.set_bind_dn = new_instancemethod(_dcerpc.Credentials_set_bind_dn,None,Credentials)
+Credentials.get_workstation = new_instancemethod(_dcerpc.Credentials_get_workstation,None,Credentials)
+Credentials.set_workstation = new_instancemethod(_dcerpc.Credentials_set_workstation,None,Credentials)
+Credentials.guess = new_instancemethod(_dcerpc.Credentials_guess,None,Credentials)
+Credentials.is_anonymous = new_instancemethod(_dcerpc.Credentials_is_anonymous,None,Credentials)
+Credentials.get_nt_hash = new_instancemethod(_dcerpc.Credentials_get_nt_hash,None,Credentials)
+Credentials.authentication_requested = new_instancemethod(_dcerpc.Credentials_authentication_requested,None,Credentials)
+Credentials.wrong_password = new_instancemethod(_dcerpc.Credentials_wrong_password,None,Credentials)
Credentials_swigregister = _dcerpc.Credentials_swigregister
Credentials_swigregister(Credentials)
diff --git a/source4/librpc/rpc/dcerpc_wrap.c b/source4/librpc/rpc/dcerpc_wrap.c
index c9eb72fb9e..c60fef9e9d 100644
--- a/source4/librpc/rpc/dcerpc_wrap.c
+++ b/source4/librpc/rpc/dcerpc_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2476,6 +2476,19 @@ static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _dcerpc.so
@@ -2775,7 +2788,7 @@ SWIGINTERN PyObject *_wrap_new_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObj
PyObject *resultobj = 0;
cli_credentials *result = 0 ;
- if (!PyArg_ParseTuple(args,(char *)":new_Credentials")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_Credentials",0,0,0)) SWIG_fail;
result = (cli_credentials *)new_cli_credentials();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cli_credentials, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3535,11 +3548,15 @@ fail:
SWIGINTERN PyObject *Credentials_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_cli_credentials, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Credentials_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_pipe_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3665,7 +3682,7 @@ fail:
static PyMethodDef SwigMethods[] = {
- { (char *)"new_Credentials", _wrap_new_Credentials, METH_VARARGS, NULL},
+ { (char *)"new_Credentials", (PyCFunction)_wrap_new_Credentials, METH_NOARGS, NULL},
{ (char *)"delete_Credentials", (PyCFunction) _wrap_delete_Credentials, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_username", (PyCFunction) _wrap_Credentials_get_username, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_username", (PyCFunction) _wrap_Credentials_set_username, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -3686,6 +3703,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Credentials_authentication_requested", (PyCFunction) _wrap_Credentials_authentication_requested, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_wrong_password", (PyCFunction) _wrap_Credentials_wrong_password, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_swigregister", Credentials_swigregister, METH_VARARGS, NULL},
+ { (char *)"Credentials_swiginit", Credentials_swiginit, METH_VARARGS, NULL},
{ (char *)"pipe_connect", (PyCFunction) _wrap_pipe_connect, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"dcerpc_server_name", (PyCFunction) _wrap_dcerpc_server_name, METH_VARARGS | METH_KEYWORDS, NULL},
{ NULL, NULL, 0, NULL }
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index 91437e1e0b..c958761c70 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -16,7 +16,7 @@ swig: pythonmods
.SUFFIXES: _wrap.c .i
.i_wrap.c:
- [ "$(SWIG)" == "no" ] || $(SWIG) -Wall -I$(srcdir)/scripting/swig -python -keyword $<
+ [ "$(SWIG)" == "no" ] || $(SWIG) -O -Wall -I$(srcdir)/scripting/swig -python -keyword $<
realdistclean::
@echo "Removing SWIG output files"
diff --git a/source4/scripting/python/misc.py b/source4/scripting/python/misc.py
index 94625be2c9..afe7b723e0 100644
--- a/source4/scripting/python/misc.py
+++ b/source4/scripting/python/misc.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _misc
import new
@@ -48,6 +47,16 @@ except AttributeError:
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
+
+
random_password = _misc.random_password
diff --git a/source4/scripting/python/misc_wrap.c b/source4/scripting/python/misc_wrap.c
index 2237f9cb03..fbdd33afda 100644
--- a/source4/scripting/python/misc_wrap.c
+++ b/source4/scripting/python/misc_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2478,6 +2478,19 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _misc.so