summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-08 11:54:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:35 -0500
commit3f7bf05f75c050c5132168b7eea6a346abfb482c (patch)
tree036922ea80caa257f8228b11c492e61842822061 /source4/scripting
parent0e6799177c5d1c0904a904d4ff705d33d74d7d56 (diff)
downloadsamba-3f7bf05f75c050c5132168b7eea6a346abfb482c.tar.gz
samba-3f7bf05f75c050c5132168b7eea6a346abfb482c.tar.bz2
samba-3f7bf05f75c050c5132168b7eea6a346abfb482c.zip
r2253: Add test program, as small example of what's going on.
(This used to be commit fd31ae38dfe2d005b3e01ac059c2e15fa389aad4)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/swig/dcerpc.i2
-rwxr-xr-xsource4/scripting/swig/test13
2 files changed, 15 insertions, 0 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index afa968a640..6769b4efc1 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -112,6 +112,8 @@ uint32 get_uint32_property(PyObject *dict, char *key)
%types(struct dcerpc_pipe *);
+%rename(pipe_connect) dcerpc_pipe_connect;
+
NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
const char *binding,
const char *pipe_uuid,
diff --git a/source4/scripting/swig/test b/source4/scripting/swig/test
new file mode 100755
index 0000000000..479f447860
--- /dev/null
+++ b/source4/scripting/swig/test
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+import dcerpc
+import gc
+gc.set_debug(gc.DEBUG_LEAK)
+
+handle = dcerpc.pipe_connect("ncacn_np:win2k3dc",
+ dcerpc.DCERPC_SAMR_UUID, dcerpc.DCERPC_SAMR_VERSION,
+ "win2k3dom", "administrator", "penguin")
+
+connect = {"system_name": "win2k3dc", "access_mask": 12345}
+
+print dcerpc.samr_Connect2(handle, connect)