The Samba-Bugzilla – Attachment 7080 Details for
Bug 8592
SMB2: crash when more than 256 searches are open
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
torturetest to reproduce
0001-reproduce-dptr-smb2-bug-8592.patch (text/plain), 2.40 KB, created by
Christian Ambach
on 2011-11-10 14:59:49 UTC
(
hide
)
Description:
torturetest to reproduce
Filename:
MIME Type:
Creator:
Christian Ambach
Created:
2011-11-10 14:59:49 UTC
Size:
2.40 KB
patch
obsolete
>From 43060f9d7990f3f53b139eb4a629db7b82d49566 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Wed, 9 Nov 2011 16:31:52 +0100 >Subject: [PATCH] reproduce dptr smb2 bug #8592 > >--- > source3/torture/test_smb2.c | 38 ++++++++++++++++++++++++++++++++++---- > 1 files changed, 34 insertions(+), 4 deletions(-) > >diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c >index 1bd0271..9a72cae 100644 >--- a/source3/torture/test_smb2.c >+++ b/source3/torture/test_smb2.c >@@ -116,6 +116,12 @@ bool run_smb2_basic(int dummy) > return false; > } > >+{ >+#define MAX_DIRP 300 >+ uint64_t fid_persistents[MAX_DIRP]; >+ uint64_t fid_volatiles[MAX_DIRP]; >+ int i; >+for (i=0; i < MAX_DIRP; i++) { > status = smb2cli_create(cli, "", > SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */ > SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */ >@@ -127,26 +133,50 @@ bool run_smb2_basic(int dummy) > FILE_OPEN, /* create_disposition, */ > FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE, /* create_options, */ > NULL, /* smb2_create_blobs *blobs */ >- &fid_persistent, >- &fid_volatile); >+ &fid_persistents[i], >+ &fid_volatiles[i]); > if (!NT_STATUS_IS_OK(status)) { > printf("smb2cli_create returned %s\n", nt_errstr(status)); > return false; > } > > status = smb2cli_query_directory( >- cli, 1, 0, 0, fid_persistent, fid_volatile, "*", 0xffff, >+ cli, 1, 0, 0, fid_persistents[i], fid_volatiles[i], "*", 0xffff, > talloc_tos(), &dir_data, &dir_data_length); > > if (!NT_STATUS_IS_OK(status)) { > printf("smb2cli_query_directory returned %s\n", nt_errstr(status)); > return false; > } >+} >+ >+for (i=0; i < MAX_DIRP; i++) { >+ status = smb2cli_query_directory( >+ cli, 1, 0, 0, fid_persistents[i], fid_volatiles[i], "*", 0xffff, >+ talloc_tos(), &dir_data, &dir_data_length); >+ >+ if (!NT_STATUS_IS_OK(status)) { >+ printf("smb2cli_query_directory returned %s\n", nt_errstr(status)); >+ } >+} >+ >+} > > status = smb2cli_close(cli, 0, fid_persistent, fid_volatile); > if (!NT_STATUS_IS_OK(status)) { > printf("smb2cli_close returned %s\n", nt_errstr(status)); >- return false; >+ // return false; >+ } >+ >+ status = smb2cli_tdis(cli); >+ if (!NT_STATUS_IS_OK(status)) { >+ printf("smb2cli_tdis returned %s\n", nt_errstr(status)); >+ // return false; >+ } >+ status = smb2cli_logoff(cli); >+ if (!NT_STATUS_IS_OK(status)) { >+ printf("smb2cli_logoff returned %s\n", nt_errstr(status)); >+ // return false; > } > > return true; >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8592
:
7079
| 7080