switch off the default of ntlmssp on rpc on smb as some windows pipes
[samba.git] / source / torture / torture.c
index 3851337b8ec496bf84087698ac180b02e60a5f69..9fc0bc7b4e41327c4c12d668dab9d11cf74acf3b 100644 (file)
@@ -226,7 +226,18 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
        cli_tree_close(cli->tree);
 
        /* bind to the pipe, using the uuid as the key */
+#if 1
        status = dcerpc_bind_auth_none(*p, pipe_uuid, pipe_version);
+#else
+       /* enable signing on tcp connections */
+       (*p)->flags |= DCERPC_SIGN;
+
+       /* bind to the pipe, using the uuid as the key */
+       status = dcerpc_bind_auth_ntlm(*p, pipe_uuid, pipe_version,
+                                      lp_workgroup(),
+                                      lp_parm_string(-1, "torture", "username"),
+                                      lp_parm_string(-1, "torture", "password"));
+#endif
        if (!NT_STATUS_IS_OK(status)) {
                dcerpc_pipe_close(*p);
                return status;
@@ -3589,9 +3600,8 @@ BOOL torture_ioctl_test(int dummy)
        uint16 device, function;
        int fnum;
        const char *fname = "\\ioctl.dat";
-       DATA_BLOB blob;
        NTSTATUS status;
-       struct smb_ioctl parms;
+       union smb_ioctl parms;
        TALLOC_CTX *mem_ctx;
 
        if (!torture_open_connection(&cli)) {
@@ -3610,20 +3620,20 @@ BOOL torture_ioctl_test(int dummy)
                return False;
        }
 
-       parms.in.request = IOCTL_QUERY_JOB_INFO;
+       parms.ioctl.level = RAW_IOCTL_IOCTL;
+       parms.ioctl.in.request = IOCTL_QUERY_JOB_INFO;
        status = smb_raw_ioctl(cli->tree, mem_ctx, &parms);
        printf("ioctl job info: %s\n", cli_errstr(cli));
 
        for (device=0;device<0x100;device++) {
                printf("testing device=0x%x\n", device);
                for (function=0;function<0x100;function++) {
-                       parms.in.request = (device << 16) | function;
+                       parms.ioctl.in.request = (device << 16) | function;
                        status = smb_raw_ioctl(cli->tree, mem_ctx, &parms);
 
                        if (NT_STATUS_IS_OK(status)) {
                                printf("ioctl device=0x%x function=0x%x OK : %d bytes\n", 
-                                       device, function, blob.length);
-                               data_blob_free(&parms.out.blob);
+                                       device, function, parms.ioctl.out.blob.length);
                        }
                }
        }