install -d/-D with -Z or --context relabels directories that already exist
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
The bug is in the install utility's -Z/--context handling for -d and -D. Compare how it labels parent directories against GNU, which labels only the directories it creates, and check that an existing target is left alone. Pull request 15333 is already open against this issue, so review or build on it rather than starting a parallel fix. Done means that with a context set, only newly created directories get the label, verified with ls -Zd on a SELinux system or a test that checks the labels.
Written by the indexing model from the issue text.
Description
With -Z or --context, uutils install sets the context not only on the directories it creates but also on every existing parent of the target, up to and including / for an absolute path. GNU install labels only the directories it creates.
On Fedora with SELinux enforcing, as root (relative names keep this inside the current directory):
# mkdir -p /var/www/html/t/p && cd /var/www/html/t && restorecon -R .
# install -d --context=system_u:object_r:tmp_t:s0 p/n/a
# ls -Zd p p/n p/n/a
GNU coreutils 9.12: p keeps httpd_sys_content_t; p/n and p/n/a are tmp_t.
uutils main: all three are tmp_t.
install -d --context=... existing also relabels an existing target directory, which GNU leaves alone.
- Dominant language
- Rust
- Stars
- 24.3k
- Forks
- 2.1k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 327
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/coreutils
-
minorbug(mv): invalid mode errors not quotedPossibly taken @henrimarconni claimed this 3 days ago. OpenU - mv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
ptx: break file missing path in error messagePossibly taken @Franklin-Qi claimed this 3 days ago. OpenU - ptx
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
uutils/coreutils#15307 · 1 comment ·
Maintainers usually reply within 1 day
-
minorbug(stat): os errno not stripped when failing to flush stdoutPossibly taken @cestercian claimed this 11 days ago. OpenU - stat
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
uutils/coreutils#15200 · 3 comments ·
Maintainers usually reply within 1 day
-
stty: support B460800 and B921600 baud ratesPossibly taken @oech3 claimed this 6 days ago. Openawaiting upstream U - stty
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
B - high priority U - du
Difficulty 1/5 Under an hour Newbie friendliness 82/100
uutils/coreutils#14984 · 1 comment ·
Maintainers usually reply within 1 day
All issues in uutils/coreutils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
chipsalliance/caliptra-sw#4311 ·
Maintainers usually reply within 2 days
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Possibly taken @ericz7900 claimed this today. Openllm translation
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Help-Wanted Needs-Triage Package-Request
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
microsoft/winget-pkgs#456324 ·
Maintainers usually reply within 1 day
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ClickHouse/ClickHouse#126833 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day