From c8c7fb2492d3f19939df67f98e4ea6ad423274da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Nov 2005 09:25:25 +0000 Subject: r11775: added support for creating files on SMB2 with initial EA lists and an ACL (This used to be commit ff197092988cee64742f83df23c43ae664a196f9) --- source4/torture/smb2/scan.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'source4/torture/smb2/scan.c') diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index f3a7cd4aa9..908dac3e11 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -96,6 +96,50 @@ BOOL torture_smb2_getinfo_scan(void) return True; } +/* + scan for valid SMB2 setinfo levels +*/ +BOOL torture_smb2_setinfo_scan(void) +{ + TALLOC_CTX *mem_ctx = talloc_new(NULL); + struct smb2_tree *tree; + NTSTATUS status; + struct smb2_setinfo io; + struct smb2_handle handle; + int c, i; + + if (!torture_smb2_connection(mem_ctx, &tree)) { + return False; + } + + if (!torture_setup_complex_file(FNAME)) { + printf("Failed to setup complex file '%s'\n", FNAME); + } + torture_setup_complex_file(FNAME ":2ndstream"); + + torture_smb2_testfile(tree, FNAME, &handle); + + ZERO_STRUCT(io); + io.in.blob = data_blob_talloc(mem_ctx, NULL, 1024); + + for (c=1;c<5;c++) { + for (i=0;i<0x100;i++) { + io.in.level = (i<<8) | c; + io.in.handle = handle; + status = smb2_setinfo(tree, &io); + if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) && + !NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + printf("file level 0x%04x - %s\n", + io.in.level, nt_errstr(status)); + } + } + } + + talloc_free(mem_ctx); + + return True; +} + /* scan for valid SMB2 opcodes */ -- cgit