From: Joseph Sutton Date: Thu, 25 Aug 2022 01:56:47 +0000 (+1200) Subject: s3:tests: Create test directory and file prior to revoking permissions X-Git-Tag: talloc-2.4.0~1333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=989aa441dfb6ba7a5e8b8f6e833f9d76b94d64f8;p=thirdparty%2Fsamba.git 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 --- 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" ) #