]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/torture: Remove already existing test_dir
authorAnoop C S <anoopcs@samba.org>
Wed, 29 May 2024 13:22:10 +0000 (18:52 +0530)
committerRalph Boehme <slow@samba.org>
Mon, 10 Jun 2024 13:17:58 +0000 (13:17 +0000)
In configurations where vfs_acl_xattr is used with 'ignore system acls'
option we encounter NT_STATUS_ACCESS_DENIED while trying to open an
already existing test_dir in smb2.delete-on-close-perms.READONLY. Due
to missing SEC_STD_DELETE permission from the list of allowed ACEs it
couldn't be removed via previous call to smb2_deltree(). Thus as seen
with other tests we now call set_dir_delete_perms() so that subsequent
attempt to remove it can succeed.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jun 10 13:17:58 UTC 2024 on atb-devel-224

source4/torture/smb2/delete-on-close.c

index 50c6c83c532b61fb9045b51ca17ab589c70dc2fe..33561516fa0e8b16dbd503ede6a9a4bb502ece35 100644 (file)
@@ -580,6 +580,9 @@ static bool test_doc_read_only(struct torture_context *tctx,
        expected_status = delete_readonly ?
                NT_STATUS_OK : NT_STATUS_CANNOT_DELETE;
 
+       /* File should not exist for this first test, so make sure */
+       set_dir_delete_perms(tctx, tree);
+
        smb2_deltree(tree, DNAME);
 
        status = torture_smb2_testdir(tree, DNAME, &dir_handle);