Repository navigation
install: give files the policy's default context under -Z - #15359
abendrothj wants to merge 3 commits into
Conversation
|
GNU testsuite comparison: |
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | factor_five_38_bit_primes |
1.6 s | 1.9 s | -12.47% |
| ⚡ | Simulation | factor_three_39_bit_primes |
567 ms | 449.3 ms | +26.18% |
| ⚡ | Simulation | factor_thirteen_39_bit_primes |
9.5 s | 9.1 s | +4.42% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing abendrothj:install-context-files (4a1a28b) with main (c76f272)
Footnotes
-
70 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Closes #15091
Based on #15333.
With
-Z, install labelled a new file from its parent directory's context, and turned any type containingtmpintouser_home_t, instead of asking the policy as GNU does. It now sets the policy's default after the copy, as-d -Zdoes for an existing directory, and keeps the kernel's label where the policy has none. The parent-derived helper is removed.Checked on Fedora (enforcing) against GNU 9.12:
install -Z f /tmp/fis nowuser_tmp_t(wasuser_home_t), and a file in anetc_tdirectory under$HOMEgetsuser_home_t(wasetc_t). Added two tests that fail without the change.