mkfifo: Fix path-based chmod race #10020#10052
Open
aristarhoskal wants to merge 2 commits intouutils:mainfrom
Open
mkfifo: Fix path-based chmod race #10020#10052aristarhoskal wants to merge 2 commits intouutils:mainfrom
aristarhoskal wants to merge 2 commits intouutils:mainfrom
Conversation
c7f5277 to
003e34e
Compare
|
GNU testsuite comparison: |
f640c78 to
36253b5
Compare
|
GNU testsuite comparison: |
sylvestre
reviewed
Jan 4, 2026
| if let Err(e) = fs::set_permissions(&f, fs::Permissions::from_mode(mode)) { | ||
| return Err(USimpleError::new( | ||
| 1, | ||
| translate!("mkfifo-error-cannot-set-permissions", "path" => f.quote(), "error" => e), |
Contributor
There was a problem hiding this comment.
i think we want to keep the error display here, no ?
Author
There was a problem hiding this comment.
Yes you are right, we can check errno to see if we cannot set permissions, since permissions are set by mkfifo now.
36253b5 to
36c1a2f
Compare
|
GNU testsuite comparison: |
36c1a2f to
7845e90
Compare
|
GNU testsuite comparison: |
Contributor
|
i am trying a different approach here: #10310 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10020
std::fs::set_permissionsmode is passed directly tolibc::mkfifotest_create_fifo_permission_deniedexpecting a "permission denied" error since there is no longer a separate step in setting permissionsumaskwhich is applied automatically withmkfifo, withoutstd::fs::set_permissionswe temporarily setumaskto 0.