1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

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 commit is contained in:
Andrew Tridgell 2005-11-12 08:19:39 +00:00 committed by Gerald (Jerry) Carter
parent 845bbef803
commit 5d0cd9d041

View File

@ -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;