diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-11 23:27:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:13 -0500 |
commit | 91e1893741741de04b73a098495c697434105803 (patch) | |
tree | c27a19ce56685bf357b778175a85df5dc700a9fc /source4/torture | |
parent | 222e197b848e2f1e58602d1e709f057a1f8833fd (diff) | |
download | samba-91e1893741741de04b73a098495c697434105803.tar.gz samba-91e1893741741de04b73a098495c697434105803.tar.bz2 samba-91e1893741741de04b73a098495c697434105803.zip |
r11691: added reply buffer code checks and oplock flags for create request/reply
(This used to be commit 26ed781375c03958241d8c93324e04e948944d01)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/smb2/connect.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c index 68eb922b55..2af6bfb576 100644 --- a/source4/torture/smb2/connect.c +++ b/source4/torture/smb2/connect.c @@ -205,7 +205,8 @@ static NTSTATUS torture_smb2_close(struct smb2_tree *tree, struct smb2_handle ha TALLOC_CTX *tmp_ctx = talloc_new(tree); ZERO_STRUCT(io); - io.in.unknown1 = 0x10018; + io.in.buffer_code = 0x18; + io.in.flags = SMB2_CLOSE_FLAGS_FULL_INFORMATION; io.in.handle = handle; status = smb2_close(tree, &io); if (!NT_STATUS_IS_OK(status)) { @@ -239,11 +240,11 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree, TALLOC_CTX *tmp_ctx = talloc_new(tree); ZERO_STRUCT(io); - io.in.unknown1 = 0x09000039; /* gets an oplock */ - io.in.unknown1 = 0x00000039; /* no oplock */ + io.in.buffer_code = 0x39; + io.in.oplock_flags = 0; io.in.access_mask = SEC_RIGHTS_FILE_ALL; io.in.file_attr = FILE_ATTRIBUTE_NORMAL; - io.in.open_disposition = NTCREATEX_DISP_OPEN; + io.in.open_disposition = NTCREATEX_DISP_OPEN_IF; io.in.share_access = NTCREATEX_SHARE_ACCESS_DELETE| NTCREATEX_SHARE_ACCESS_READ| @@ -258,6 +259,8 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree, } printf("Open gave:\n"); + printf("oplock_flags = 0x%x\n", io.out.oplock_flags); + printf("create_action = 0x%x\n", io.out.create_action); printf("create_time = %s\n", nt_time_string(tmp_ctx, io.out.create_time)); printf("access_time = %s\n", nt_time_string(tmp_ctx, io.out.access_time)); printf("write_time = %s\n", nt_time_string(tmp_ctx, io.out.write_time)); @@ -291,8 +294,8 @@ BOOL torture_smb2_connect(void) transport = torture_smb2_negprot(mem_ctx, host); session = torture_smb2_session(transport, credentials); tree = torture_smb2_tree(session, share); - h1 = torture_smb2_create(tree, "test.dat"); - h2 = torture_smb2_create(tree, "test1.dat"); + h1 = torture_smb2_create(tree, "test9.dat"); + h2 = torture_smb2_create(tree, "test9.dat"); torture_smb2_close(tree, h1); torture_smb2_close(tree, h2); |