Skip to content

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!

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