Fix mkfifo symbolic mode handling for POSIX compliance#556
Draft
Fix mkfifo symbolic mode handling for POSIX compliance#556
Conversation
- Fix clap to allow mode values starting with - (e.g., `-m -w`) - Fix modestr::mutate to correctly handle Remove operations with umask - Bypass umask when creating FIFO with explicit -m mode per POSIX - When no who is specified in symbolic mode remove operations, umask protects bits from being removed Co-authored-by: jgarzik <494411+jgarzik@users.noreply.github.com>
- Test basic FIFO creation - Test error cases (already exists, invalid mode) - Test absolute mode setting - Test symbolic modes (+x, -w, a-w) - Test multiple FIFO creation - All tests verify POSIX-compliant behavior Co-authored-by: jgarzik <494411+jgarzik@users.noreply.github.com>
- Replace dummy umask value with Option<mode_t> - Improves code clarity and safety Co-authored-by: jgarzik <494411+jgarzik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix mkfifo mode behavior for permissions
Fix mkfifo symbolic mode handling for POSIX compliance
Feb 8, 2026
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.
mkfifowas incorrectly handling symbolic modes:-m +xproduced 0755 instead of 0777, and-m -wfailed to parse. Per POSIX, symbolic modes in mkfifo must start froma=rw(0666) and explicit-mshould bypass umask.Changes
allow_hyphen_values = trueto clap parser; temporarily set umask to 0 when creating FIFO with explicit-mflaguser &= !(rwx << 6) & !umasktouser &= !(rwx << 6) | (umask & S_IRWXU)to correctly protect masked bits from removalBehavior
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
pubs.opengroup.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.