summaryrefslogtreecommitdiff
path: root/source4/libnet/net.i
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-28 16:25:27 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-28 10:33:02 -0600
commit68b698270481f2b033046dcd6e0a293c1cdaf838 (patch)
tree8a1a05d89cb992395446673af05e9ca0a1992da8 /source4/libnet/net.i
parent405a20b44f69812b0225cd12370433842b28c2ca (diff)
downloadsamba-68b698270481f2b033046dcd6e0a293c1cdaf838.tar.gz
samba-68b698270481f2b033046dcd6e0a293c1cdaf838.tar.bz2
samba-68b698270481f2b033046dcd6e0a293c1cdaf838.zip
r26624: libnet/python: Use standard function for constructing context, allow overriding credentials.
(This used to be commit a5fb3caedefaf5387e3a384d060272f11a3b4b99)
Diffstat (limited to 'source4/libnet/net.i')
-rw-r--r--source4/libnet/net.i9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/libnet/net.i b/source4/libnet/net.i
index 1ca26ddcf7..aad008939f 100644
--- a/source4/libnet/net.i
+++ b/source4/libnet/net.i
@@ -22,18 +22,23 @@
#include "includes.h"
#include "libnet/libnet.h"
#include "lib/events/events.h"
+#include "param/param.h"
typedef struct libnet_context libnet;
%}
%import "../libcli/util/errors.i"
%import "../lib/events/events.i"
%import "../lib/talloc/talloc.i"
+%import "../param/param.i"
-struct libnet_context *libnet_context_init(struct event_context *ev,
- struct loadparm_context *lp_ctx);
+%talloctype(libnet_context);
typedef struct libnet_context {
+ struct cli_credentials *cred;
%extend {
+ libnet(struct event_context *ev, struct loadparm_context *lp_ctx) {
+ return libnet_context_init(ev, lp_ctx);
+ }
NTSTATUS samsync_ldb(TALLOC_CTX *mem_ctx, struct libnet_samsync_ldb *r);
NTSTATUS DomainList(TALLOC_CTX *mem_ctx, struct libnet_DomainList *io);
NTSTATUS DomainClose(TALLOC_CTX *mem_ctx, struct libnet_DomainClose *io);