From 989aa441dfb6ba7a5e8b8f6e833f9d76b94d64f8 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Thu, 25 Aug 2022 13:56:47 +1200 Subject: [PATCH] s3:tests: Create test directory and file prior to revoking permissions If 'chmod 0' is performed first, then we won't have the required permissions for the subsequent 'mkdir' and 'touch', and they will fail. Signed-off-by: Joseph Sutton Reviewed-by: Jeremy Allison --- source3/script/tests/test_symlink_traversal_smb2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/script/tests/test_symlink_traversal_smb2.sh b/source3/script/tests/test_symlink_traversal_smb2.sh index 971d5344216..a67341d1f9a 100755 --- a/source3/script/tests/test_symlink_traversal_smb2.sh +++ b/source3/script/tests/test_symlink_traversal_smb2.sh @@ -140,10 +140,10 @@ chmod 0 "$dir_outside_share_noperms" ln -s "file_inside_share_noperms" "symlink_file_inside_share_noperms" mkdir "dir_inside_share_noperms" touch "dir_inside_share_noperms/noperm_file_exists" - chmod 0 "dir_inside_share_noperms" ln -s "dir_inside_share_noperms" "symlink_dir_inside_share_noperms" mkdir "dir_inside_share_noperms/noperm_subdir_exists" touch "dir_inside_share_noperms/noperm_subdir_exists/noperm_subdir_file_exists" + chmod 0 "dir_inside_share_noperms" ) # -- 2.47.3