s3:torture: make use of CLI_FULL_CONNECTION_FORCE_DOS_ERRORS
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Sep 2011 07:24:11 +0000 (09:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 8 Sep 2011 15:51:30 +0000 (17:51 +0200)
metze

source3/torture/torture.c

index 495875b27ac55c92328945bb6edfbaf30738d050..49f26a37a3687a5ffb9318785e50c7d4a7937636 100644 (file)
@@ -57,6 +57,7 @@ static bool use_oplocks;
 static bool use_level_II_oplocks;
 static const char *client_txt = "client_oplocks.txt";
 static bool use_kerberos;
+static bool force_dos_errors;
 static fstring multishare_conn_fname;
 static bool use_multishare_conn = False;
 static bool do_encrypt;
@@ -195,6 +196,10 @@ static struct cli_state *open_nbt_connection(void)
                flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
        }
 
+       if (force_dos_errors) {
+               flags |= CLI_FULL_CONNECTION_FORCE_DOS_ERRORS;
+       }
+
        status = cli_connect_nb(host, NULL, port_to_use, 0x20, myname,
                                signing_state, flags, &c);
        if (!NT_STATUS_IS_OK(status)) {
@@ -6310,12 +6315,14 @@ static bool run_error_map_extract(int dummy) {
 
        /* DOS-Error connection */
 
+       force_dos_errors = true;
        if (!(c_dos = open_nbt_connection())) {
+               force_dos_errors = false;
                return False;
        }
+       force_dos_errors = false;
 
        c_dos->use_spnego = False;
-       c_dos->force_dos_errors = True;
 
        status = cli_negprot(c_dos);
        if (!NT_STATUS_IS_OK(status)) {