diff options
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/auth.py | 11 | ||||
-rw-r--r-- | source4/auth/auth_wrap.c | 15 | ||||
-rw-r--r-- | source4/auth/credentials/credentials.py | 59 | ||||
-rw-r--r-- | source4/auth/credentials/credentials_wrap.c | 26 |
4 files changed, 77 insertions, 34 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 } }; |