r6208: Add cli_credentials support for swig wrappers. For the moment it
authorTim Potter <tpot@samba.org>
Tue, 5 Apr 2005 07:58:02 +0000 (07:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:26 +0000 (13:11 -0500)
only does anonymous connections.
(This used to be commit b09a4723539235fc924134aa50fc4aed040afb33)

source4/scripting/swig/dcerpc.i
source4/scripting/swig/samba.i
source4/scripting/swig/torture/pytorture
source4/scripting/swig/torture/torture_samr.py

index a1261f997d9b63e0efbc3592ed7a29168c307bf9..a76e1301af06623dcddbe5f1c3a58c0a4b6403c2 100644 (file)
@@ -153,13 +153,12 @@ void set_werror_exception(int status)
 
 %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);
index c7b8b46e665900ac066c44902538d5f1ea2d94f2..620d908699e233043898a9c12415e09119f5535b 100644 (file)
@@ -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);
+}
index fd4a92eeb4f4abb16d7271105ca675ff18c5db14..e0123447e8fb2a2aeb0b431f8b818658d0df61a3 100755 (executable)
@@ -48,4 +48,4 @@ for test in args:
    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))
index 929420695da3300a48996346f1478c4e7f9b9d1f..2064d28044392fd8ea7f6592b60ce5c84a5f244b 100755 (executable)
@@ -721,13 +721,12 @@ def test_EnumDomains(pipe, connect_handle):
     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)