Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: parent-perm-race gnu fix #6403

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

matrixhead
Copy link
Contributor

@matrixhead matrixhead commented May 15, 2024

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

Copy link

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)

@matrixhead matrixhead force-pushed the parent-perm-race branch 5 times, most recently from b103d1b to 3700547 Compare May 15, 2024 08:16
Copy link

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)

@matrixhead matrixhead force-pushed the parent-perm-race branch 2 times, most recently from 0e28cd3 to eec25a0 Compare May 15, 2024 11:23
@matrixhead matrixhead marked this pull request as draft May 15, 2024 11:42
Copy link

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!

@matrixhead matrixhead force-pushed the parent-perm-race branch 2 times, most recently from 58fac2b to d720a91 Compare May 15, 2024 16:05
Copy link

GNU testsuite comparison:

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

Copy link

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!

Copy link

GNU testsuite comparison:

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

@matrixhead matrixhead marked this pull request as ready for review May 20, 2024 03:11
@sylvestre
Copy link
Contributor

terrific!

@sylvestre sylvestre merged commit f2f4a42 into uutils:main May 20, 2024
66 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants