From 80527a0c686a64d8617422b5791888bde647c342 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 May 2008 15:35:52 +1000 Subject: added EAs in the generated SMB2 create operation (This used to be commit 607bf6a946ffd7f768bda44c461ee82fcfc101c1) --- source4/torture/gentest_smb2.c | 44 ++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/gentest_smb2.c b/source4/torture/gentest_smb2.c index 8075465737..a219403b27 100644 --- a/source4/torture/gentest_smb2.c +++ b/source4/torture/gentest_smb2.c @@ -684,6 +684,21 @@ static struct ea_struct gen_ea_struct(void) return ea; } +/* + generate an ea_struct +*/ +static struct smb_ea_list gen_ea_list(void) +{ + struct smb_ea_list eas; + int i; + eas.num_eas = gen_int_range(0, 3); + eas.eas = talloc_array(current_op.mem_ctx, struct ea_struct, eas.num_eas); + for (i=0;igeneric.level = levels[i].level; switch (info->generic.level) { - case RAW_SFILEINFO_SETATTR: - info->setattr.in.attrib = gen_attrib(); - info->setattr.in.write_time = gen_timet(); - break; - case RAW_SFILEINFO_SETATTRE: - info->setattre.in.create_time = gen_timet(); - info->setattre.in.access_time = gen_timet(); - info->setattre.in.write_time = gen_timet(); - break; - case RAW_SFILEINFO_STANDARD: - info->standard.in.create_time = gen_timet(); - info->standard.in.access_time = gen_timet(); - info->standard.in.write_time = gen_timet(); - break; case RAW_SFILEINFO_EA_SET: { static struct ea_struct ea; info->ea_set.in.num_eas = 1; @@ -1467,6 +1462,7 @@ static void gen_setfileinfo(int instance, union smb_setfileinfo *info) } } +#if 0 /* generate setfileinfo operations */ @@ -1481,14 +1477,12 @@ static bool handler_sfileinfo(int instance) GEN_COPY_PARM; GEN_SET_FNUM(generic.in.file.fnum); - GEN_CALL(smb_raw_setfileinfo(tree, &parm[i])); + GEN_CALL(smb2_setinfo_file(tree, &parm[i])); return true; } - #endif - /* wipe any relevant files */ -- cgit