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: restrict permissions when copying FIFO #4211

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

jfinkels
Copy link
Collaborator

@jfinkels jfinkels commented Dec 3, 2022

When copying the contents of a named pipe (also known as a FIFO) via

cp --preserve=ownership --copy-contents fifo fifo-copy

limit the permissions of the destination file while the contents are being copied, and then restore the permissions to match those of the source FIFO when all contents have been copied successfully.

This should cause the GNU test suite file tests/cp/file-perm-race.sh to pass.

When copying the contents of a named pipe (also known as a FIFO) via

    cp --preserve=ownership --copy-contents fifo fifo-copy

limit the permissions of the destination file while the contents are
being copied, and then restore the permissions to match those of the
source FIFO when all contents have been copied successfully.
@github-actions
Copy link

github-actions bot commented Dec 3, 2022

GNU testsuite comparison:

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

1 similar comment
@github-actions
Copy link

github-actions bot commented Dec 4, 2022

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit 122cdc2 into uutils:main Dec 4, 2022
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