coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

cp: parent-perm-race gnu fix

Open matrixhead opened this issue 1 year ago • 4 comments

Hi, this pr tries to fix parent-perm-race gnu test case. this test tries to check the temporary permissions of directories created by cp which might be too permissive under some conditions.

This is how gnu's cp behaves, when --preserve=mode or --preserve=ownership is given whenever it creates a directory it disables some permissions for group and others. I'm not entirely sure why gnu's cp is doing this, but my assumption is that when the user tries to preserve mode or ownership they're expecting some security guarantees in the destination directory, but having permissions that are too permissive even for a short period of time might compromise that security guarantee.

#4211 is a pr that fixes a similar issue

matrixhead avatar May 15 '24 05:05 matrixhead

GNU testsuite comparison:

Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar May 15 '24 06:05 github-actions[bot]

GNU testsuite comparison:

Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar May 15 '24 09:05 github-actions[bot]

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!

github-actions[bot] avatar May 15 '24 11:05 github-actions[bot]

GNU testsuite comparison:

Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!

github-actions[bot] avatar May 15 '24 16:05 github-actions[bot]

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!

github-actions[bot] avatar May 15 '24 16:05 github-actions[bot]

GNU testsuite comparison:

Congrats! The gnu test tests/cp/parent-perm-race is no longer failing!

github-actions[bot] avatar May 20 '24 03:05 github-actions[bot]

terrific!

sylvestre avatar May 20 '24 06:05 sylvestre