svn commit: samba r11699 - in branches/SAMBA_4_0/source/torture/smb2: .

tridge at samba.org tridge at samba.org
Sat Nov 12 08:19:40 GMT 2005


Author: tridge
Date: 2005-11-12 08:19:39 +0000 (Sat, 12 Nov 2005)
New Revision: 11699

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11699

Log:

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


Modified:
   branches/SAMBA_4_0/source/torture/smb2/scan.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smb2/scan.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/scan.c	2005-11-12 08:18:52 UTC (rev 11698)
+++ branches/SAMBA_4_0/source/torture/smb2/scan.c	2005-11-12 08:19:39 UTC (rev 11699)
@@ -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 @@
 		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;



More information about the samba-cvs mailing list