s3:torture: make use of cli_full_connection_creds() in torture.c
authorStefan Metzmacher <metze@samba.org>
Fri, 28 Oct 2016 10:44:51 +0000 (12:44 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 9 Dec 2016 08:24:27 +0000 (09:24 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/torture/torture.c

index ba50462f2e6ca71ca045200ac64d56f11494b06c..aac558fd8200d33d0ad3a40800b20b656ad2014d 100644 (file)
@@ -339,18 +339,21 @@ static bool torture_open_connection_share(struct cli_state **c,
        int flags = 0;
        NTSTATUS status;
 
-       if (use_kerberos)
-               flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
        if (use_oplocks)
                flags |= CLI_FULL_CONNECTION_OPLOCKS;
        if (use_level_II_oplocks)
                flags |= CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS;
 
-       status = cli_full_connection(c, myname,
-                                    hostname, NULL, port_to_use, 
-                                    sharename, "?????", 
-                                    username, workgroup, 
-                                    password, flags, signing_state);
+       status = cli_full_connection_creds(c,
+                                          myname,
+                                          hostname,
+                                          NULL, /* dest_ss */
+                                          port_to_use,
+                                          sharename,
+                                          "?????",
+                                          torture_creds,
+                                          flags,
+                                          signing_state);
        if (!NT_STATUS_IS_OK(status)) {
                printf("failed to open share connection: //%s/%s port:%d - %s\n",
                        hostname, sharename, port_to_use, nt_errstr(status));
@@ -1513,11 +1516,16 @@ static bool run_tcon_devtype_test(int dummy)
        NTSTATUS status;
        bool ret = True;
 
-       status = cli_full_connection(&cli1, myname,
-                                    host, NULL, port_to_use,
-                                    NULL, NULL,
-                                    username, workgroup,
-                                    password, flags, signing_state);
+       status = cli_full_connection_creds(&cli1,
+                                          myname,
+                                          host,
+                                          NULL, /* dest_ss */
+                                          port_to_use,
+                                          NULL, /* service */
+                                          NULL, /* service_type */
+                                          torture_creds,
+                                          flags,
+                                          signing_state);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("could not open connection\n");