From b640f475be9b0f83e7812a5c7756344c5891cba3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Feb 2008 17:11:36 +1100 Subject: updated SMB2 code for getinfo according to WSPP docs - Updated getinfo structures and field names - also updated the protocol revision number handling to reflect new docs (This used to be commit 3aaa2e86d94675c6c68d66d75292c3e34bfbc81b) --- source4/torture/smb2/scan.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index 84be11c047..0f4c9fefdf 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -68,19 +68,21 @@ bool torture_smb2_getinfo_scan(struct torture_context *torture) ZERO_STRUCT(io); - io.in.max_response_size = 0xFFFF; + io.in.output_buffer_length = 0xFFFF; for (c=1;c<5;c++) { for (i=0;i<0x100;i++) { - io.in.level = (i<<8) | c; + io.in.info_type = c; + io.in.info_class = i; io.in.file.handle = fhandle; status = smb2_getinfo(tree, torture, &io); if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) && !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) && !NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { - printf("file level 0x%04x is %ld bytes - %s\n", - io.in.level, (long)io.out.blob.length, nt_errstr(status)); + printf("file level 0x%02x:%02x is %ld bytes - %s\n", + io.in.info_type, io.in.info_class, + (long)io.out.blob.length, nt_errstr(status)); dump_data(1, io.out.blob.data, io.out.blob.length); } @@ -89,8 +91,9 @@ bool torture_smb2_getinfo_scan(struct torture_context *torture) if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) && !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) && !NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { - printf("dir level 0x%04x is %ld bytes - %s\n", - io.in.level, (long)io.out.blob.length, nt_errstr(status)); + printf("dir level 0x%02x:%02x is %ld bytes - %s\n", + io.in.info_type, io.in.info_class, + (long)io.out.blob.length, nt_errstr(status)); dump_data(1, io.out.blob.data, io.out.blob.length); } } -- cgit