1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

r26445: Fix credentials python bindings.

(This used to be commit 7a78d4cbedbe03ea227e66e6f573fca7519fbf67)
This commit is contained in:
Jelmer Vernooij 2007-12-14 00:35:05 +01:00 committed by Stefan Metzmacher
parent 584044d5e7
commit 93b570616d
3 changed files with 11 additions and 4 deletions

View File

@ -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);

View File

@ -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

View File

@ -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 );