svn commit: samba r6208 - in branches/SAMBA_4_0/source/scripting/swig: . torture

tpot at samba.org tpot at samba.org
Tue Apr 5 07:58:03 GMT 2005


Author: tpot
Date: 2005-04-05 07:58:02 +0000 (Tue, 05 Apr 2005)
New Revision: 6208

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6208

Log:
Add cli_credentials support for swig wrappers.  For the moment it
only does anonymous connections.

Modified:
   branches/SAMBA_4_0/source/scripting/swig/dcerpc.i
   branches/SAMBA_4_0/source/scripting/swig/samba.i
   branches/SAMBA_4_0/source/scripting/swig/torture/pytorture
   branches/SAMBA_4_0/source/scripting/swig/torture/torture_samr.py


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/dcerpc.i
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/dcerpc.i	2005-04-05 07:03:31 UTC (rev 6207)
+++ branches/SAMBA_4_0/source/scripting/swig/dcerpc.i	2005-04-05 07:58:02 UTC (rev 6208)
@@ -153,13 +153,12 @@
 
 %rename(pipe_connect) dcerpc_pipe_connect;
 
-NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
+NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx,
+	                     struct dcerpc_pipe **OUT,
                              const char *binding,
                              const char *pipe_uuid,
                              uint32_t pipe_version,
-                             const char *domain,
-                             const char *username,
-                             const char *password);
+			     struct cli_credentials *credentials);
 
 %typemap(in) DATA_BLOB * (DATA_BLOB temp_data_blob) {
 	temp_data_blob.data = PyString_AsString($input);

Modified: branches/SAMBA_4_0/source/scripting/swig/samba.i
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/samba.i	2005-04-05 07:03:31 UTC (rev 6207)
+++ branches/SAMBA_4_0/source/scripting/swig/samba.i	2005-04-05 07:58:02 UTC (rev 6208)
@@ -60,3 +60,9 @@
 %typemap(out) NTSTATUS {
         $result = PyLong_FromUnsignedLong(NT_STATUS_V($1));
 }
+
+%typemap(in) struct cli_credentials * {
+	$1 = cli_credentials_init(arg1);
+	cli_credentials_set_anonymous($1);
+//	cli_credentials_set_workstation($1, "FROGURT", CRED_SPECIFIED);
+}

Modified: branches/SAMBA_4_0/source/scripting/swig/torture/pytorture
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/pytorture	2005-04-05 07:03:31 UTC (rev 6207)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/pytorture	2005-04-05 07:58:02 UTC (rev 6208)
@@ -48,4 +48,4 @@
    if not hasattr(module, 'runtests'):
       print 'Module "%s" does not have a runtests function' % test
 
-   module.runtests(binding, domain, username, password)
+   module.runtests(binding, (domain, username, password))

Modified: branches/SAMBA_4_0/source/scripting/swig/torture/torture_samr.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/torture_samr.py	2005-04-05 07:03:31 UTC (rev 6207)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/torture_samr.py	2005-04-05 07:58:02 UTC (rev 6208)
@@ -721,13 +721,12 @@
     for domain in connect_handle.EnumDomains():
         test_LookupDomain(pipe, connect_handle, domain)
 
-def runtests(binding, domain, username, password):
+def runtests(binding, creds):
 
     print 'Testing SAMR pipe'
 
     pipe = dcerpc.pipe_connect(binding,
-            dcerpc.DCERPC_SAMR_UUID, int(dcerpc.DCERPC_SAMR_VERSION),
-            domain, username, password)
+            dcerpc.DCERPC_SAMR_UUID, int(dcerpc.DCERPC_SAMR_VERSION), creds)
 
     handle = test_Connect(pipe)
 



More information about the samba-cvs mailing list