From e9eb56068573d89f8ce45f08220ca870b3daa669 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 16 Nov 2005 11:01:15 +0000 Subject: r11741: - the buffer code (first 2 bytes in the SMB2 body) seem to be the length of the fixed body part, and +1 if there's a dynamic part - there're 3 types of dynamic blobs with uint16_t offset/uint16_t size with uint16_t offset/uint32_t size with uint32_t offset/uint32_t size /* aligned to 8 bytes */ - strings are transmitted in UTF-16 with no termination and packet into a uint16/uint16 blob metze (This used to be commit 79103c51e5c752fbdb4d25a0047b65002828df89) --- source4/torture/smb2/scan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/torture/smb2/scan.c') diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index 2f2ab82d0f..c2b14ba5c2 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -51,7 +51,6 @@ BOOL torture_smb2_getinfo_scan(void) } ZERO_STRUCT(cr); - cr.in.buffer_code = 0x39; cr.in.oplock_flags = 0; cr.in.access_mask = SEC_RIGHTS_FILE_ALL; cr.in.file_attr = FILE_ATTRIBUTE_NORMAL; @@ -62,8 +61,9 @@ BOOL torture_smb2_getinfo_scan(void) NTCREATEX_SHARE_ACCESS_WRITE; cr.in.create_options = NTCREATEX_OPTIONS_WRITE_THROUGH; cr.in.fname = fname; + cr.in.blob = data_blob(NULL, 0); - status = smb2_create(tree, &cr); + status = smb2_create(tree, mem_ctx, &cr); if (!NT_STATUS_IS_OK(status)) { printf("create of '%s' failed - %s\n", fname, nt_errstr(status)); return False; @@ -73,7 +73,6 @@ BOOL torture_smb2_getinfo_scan(void) ZERO_STRUCT(io); - io.in.buffer_code = 0x29; io.in.max_response_size = 0xFFFF; io.in.handle = handle; @@ -142,7 +141,7 @@ BOOL torture_smb2_scan(void) tree->session->transport->options.timeout = 3; for (opcode=0;opcode<1000;opcode++) { - req = smb2_request_init_tree(tree, opcode, 2); + req = smb2_request_init_tree(tree, opcode, 2, 0); SSVAL(req->out.body, 0, 0); smb2_transport_send(req); if (!smb2_request_receive(req)) { -- cgit