summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-12 08:19:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:15 -0500
commite465cad75936af15a1e6020e34a7a2db162d76ca (patch)
treeab782a60e6873ff08798059e9303f8ac8376c104 /source4/torture
parent36e4374b1d047b4857db22421c2bcc67f13b55d1 (diff)
downloadsamba-e465cad75936af15a1e6020e34a7a2db162d76ca.tar.gz
samba-e465cad75936af15a1e6020e34a7a2db162d76ca.tar.bz2
samba-e465cad75936af15a1e6020e34a7a2db162d76ca.zip
r11699: use create_complex_file() to setup a file with a wide range of
different attributes before running the getinfo level scanner, making it easier to recognise levels (This used to be commit 5d0cd9d041af71cb1bfb9cb3e0c45e0bbd8193cb)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/scan.c29
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;