[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Fri Jun 5 13:18:03 UTC 2020


The branch, master has been updated
       via  05e14173961 s4:torture:smb2: use delete-on-close in test_rw_invalid()
      from  72d69eef136 pysmbd: make sure that session unix info is filled

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 05e141739617c771cea39033893fce3c2559d125
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 2 13:52:23 2020 +0200

    s4:torture:smb2: use delete-on-close in test_rw_invalid()
    
    We test the limits here and leave a 16TB file with zeros.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Fri Jun  5 13:17:55 UTC 2020 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/smb2/read_write.c | 9 +++++++++
 1 file changed, 9 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/read_write.c b/source4/torture/smb2/read_write.c
index b0eea55d7f1..707a49b6b1c 100644
--- a/source4/torture/smb2/read_write.c
+++ b/source4/torture/smb2/read_write.c
@@ -169,6 +169,7 @@ static bool test_rw_invalid(struct torture_context *torture, struct smb2_tree *t
 	uint8_t buf[64*1024];
 	struct smb2_read rd;
 	struct smb2_write w = {0};
+	union smb_setfileinfo sfinfo;
 	TALLOC_CTX *tmp_ctx = talloc_new(tree);
 
 	ZERO_STRUCT(buf);
@@ -178,6 +179,14 @@ static bool test_rw_invalid(struct torture_context *torture, struct smb2_tree *t
 	status = torture_smb2_testfile(tree, FNAME, &h);
 	CHECK_STATUS(status, NT_STATUS_OK);
 
+	/* set delete-on-close */
+	ZERO_STRUCT(sfinfo);
+	sfinfo.generic.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
+	sfinfo.disposition_info.in.delete_on_close = 1;
+	sfinfo.generic.in.file.handle = h;
+	status = smb2_setinfo_file(tree, &sfinfo);
+	CHECK_STATUS(status, NT_STATUS_OK);
+
 	status = smb2_util_write(tree, h, buf, 0, ARRAY_SIZE(buf));
 	CHECK_STATUS(status, NT_STATUS_OK);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list