From: Anoop C S Date: Wed, 29 May 2024 13:22:10 +0000 (+0530) Subject: s4/torture: Remove already existing test_dir X-Git-Tag: tdb-1.4.11~393 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=225e6aeafc78d0508881915b8406273c15966e63;p=thirdparty%2Fsamba.git s4/torture: Remove already existing test_dir 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 Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Jun 10 13:17:58 UTC 2024 on atb-devel-224 --- diff --git a/source4/torture/smb2/delete-on-close.c b/source4/torture/smb2/delete-on-close.c index 50c6c83c532..33561516fa0 100644 --- a/source4/torture/smb2/delete-on-close.c +++ b/source4/torture/smb2/delete-on-close.c @@ -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);