summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-14 00:35:05 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:12 +0100
commit93b570616ded0db5a676f1e5dc25495d0055089b (patch)
tree479313e4fc8969fb3309f7d503c2a857eee39cd1
parent584044d5e7148c5135518500ba81caece092c04a (diff)
downloadsamba-93b570616ded0db5a676f1e5dc25495d0055089b.tar.gz
samba-93b570616ded0db5a676f1e5dc25495d0055089b.tar.bz2
samba-93b570616ded0db5a676f1e5dc25495d0055089b.zip
r26445: Fix credentials python bindings.
(This used to be commit 7a78d4cbedbe03ea227e66e6f573fca7519fbf67)
-rw-r--r--source4/auth/credentials/credentials.i8
-rw-r--r--source4/auth/credentials/credentials.py1
-rw-r--r--source4/auth/credentials/credentials_wrap.c6
3 files changed, 11 insertions, 4 deletions
diff --git a/source4/auth/credentials/credentials.i b/source4/auth/credentials/credentials.i
index 456ea75519..95293ba55a 100644
--- a/source4/auth/credentials/credentials.i
+++ b/source4/auth/credentials/credentials.i
@@ -26,11 +26,13 @@
#include "includes.h"
#include "auth/credentials/credentials.h"
+#include "param/param.h"
typedef struct cli_credentials cli_credentials;
%}
-%include "carrays.i"
-%include "typemaps.i"
+%import "carrays.i"
+%import "typemaps.i"
+%import "param/param.i"
%typemap(default) struct cli_credentials * {
$1 = NULL;
@@ -83,7 +85,7 @@ typedef struct cli_credentials {
bool set_workstation(const char *workstation,
enum credentials_obtained obtained=CRED_SPECIFIED);
- void guess(struct loadparm_context *lp_ctx = NULL);
+ void guess(struct loadparm_context *lp_ctx);
bool is_anonymous(void);
const struct samr_Password *get_nt_hash(TALLOC_CTX *mem_ctx);
diff --git a/source4/auth/credentials/credentials.py b/source4/auth/credentials/credentials.py
index 8948973e82..0d91526b8f 100644
--- a/source4/auth/credentials/credentials.py
+++ b/source4/auth/credentials/credentials.py
@@ -57,6 +57,7 @@ def _swig_setattr_nondynamic_method(set):
return set_attr
+import param
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
diff --git a/source4/auth/credentials/credentials_wrap.c b/source4/auth/credentials/credentials_wrap.c
index 9fd5814327..a2271e3599 100644
--- a/source4/auth/credentials/credentials_wrap.c
+++ b/source4/auth/credentials/credentials_wrap.c
@@ -2508,6 +2508,7 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
#include "includes.h"
#include "auth/credentials/credentials.h"
+#include "param/param.h"
typedef struct cli_credentials cli_credentials;
@@ -3363,7 +3364,7 @@ fail:
SWIGINTERN PyObject *_wrap_Credentials_guess(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
- struct loadparm_context *arg2 = (struct loadparm_context *) NULL ;
+ struct loadparm_context *arg2 = (struct loadparm_context *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
@@ -3377,6 +3378,9 @@ SWIGINTERN PyObject *_wrap_Credentials_guess(PyObject *SWIGUNUSEDPARM(self), PyO
{
arg1 = NULL;
}
+ {
+ arg2 = loadparm_init(NULL);
+ }
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:Credentials_guess",kwnames,&obj0,&obj1)) SWIG_fail;
if (obj0) {
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 );