s3:torture: make use of CLI_FULL_CONNECTION_DONT_SPNEGO
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Sep 2011 07:56:16 +0000 (09:56 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 8 Sep 2011 17:23:32 +0000 (19:23 +0200)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep  8 19:23:32 CEST 2011 on sn-devel-104

source3/torture/torture.c

index 49f26a37a3687a5ffb9318785e50c7d4a7937636..886c58eafa05734fe709e8e4210c1d802989eb75 100644 (file)
@@ -56,6 +56,7 @@ static fstring randomfname;
 static bool use_oplocks;
 static bool use_level_II_oplocks;
 static const char *client_txt = "client_oplocks.txt";
+static bool disable_spnego;
 static bool use_kerberos;
 static bool force_dos_errors;
 static fstring multishare_conn_fname;
@@ -184,6 +185,10 @@ static struct cli_state *open_nbt_connection(void)
        NTSTATUS status;
        int flags = 0;
 
+       if (disable_spnego) {
+               flags |= CLI_FULL_CONNECTION_DONT_SPNEGO;
+       }
+
        if (use_oplocks) {
                flags |= CLI_FULL_CONNECTION_OPLOCKS;
        }
@@ -6292,11 +6297,12 @@ static bool run_error_map_extract(int dummy) {
 
        /* NT-Error connection */
 
+       disable_spnego = true;
        if (!(c_nt = open_nbt_connection())) {
+               disable_spnego = false;
                return False;
        }
-
-       c_nt->use_spnego = False;
+       disable_spnego = false;
 
        status = cli_negprot(c_nt);
 
@@ -6315,15 +6321,16 @@ static bool run_error_map_extract(int dummy) {
 
        /* DOS-Error connection */
 
+       disable_spnego = true;
        force_dos_errors = true;
        if (!(c_dos = open_nbt_connection())) {
+               disable_spnego = false;
                force_dos_errors = false;
                return False;
        }
+       disable_spnego = false;
        force_dos_errors = false;
 
-       c_dos->use_spnego = False;
-
        status = cli_negprot(c_dos);
        if (!NT_STATUS_IS_OK(status)) {
                printf("%s rejected the DOS-error negprot (%s)\n", host,