diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/smb2/scan.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index 3946d19496..22d17d530c 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -28,6 +28,31 @@ #include "lib/events/events.h" +/* + create a complex file using the old SMB protocol, to make it easier to + find fields in SMB2 getinfo levels +*/ +static BOOL setup_complex_file(const char *fname) +{ + struct smbcli_state *cli; + int fnum; + + if (!torture_open_connection(&cli)) { + return False; + } + + fnum = create_complex_file(cli, cli, fname); + + if (DEBUGLVL(1)) { + torture_all_info(cli->tree, fname); + } + + talloc_free(cli); + return fnum != -1; +} + + + /* scan for valid SMB2 getinfo levels */ @@ -52,6 +77,10 @@ BOOL torture_smb2_getinfo_scan(void) return False; } + if (!setup_complex_file(fname)) { + printf("Failed to setup complex file '%s'\n", fname); + } + ZERO_STRUCT(cr); cr.in.buffer_code = 0x39; cr.in.oplock_flags = 0; |