Repository navigation
Install systemd unit templates with an explicit safe mode - #2479
Merged
Merged
Conversation
The install wrote rendered templates with Path.write_bytes(), so the caller umask decided the installed mode (0664 under Kit fleet refresh umask 002). Write every managed unit through the new installed_units leaf, which chmods the explicit 0644 independent of the umask and normalizes a legacy mode on the same write. The drift decision now counts a group-/other-writable managed unit as drift, so the existing pre-start self-heal repairs a legacy mode; the unit_drift line and event carry the observed mode=. Unrelated files keep their permissions. Fixes #2455
…ode (#2455) The drift check now treats a group-/other-writable managed unit as drift, so every fixture that fabricates a "clean" installed unit must carry the mode a real install writes. Writing them with the raw write/copyfile inherits the ambient umask: under `umask 002` (the deployment scene this Issue is about) 26 tests failed — test_systemd_deploy, test_orbi's doctor scene, the preflight self-heal and the e2e concurrency suite — while the product itself was correct. All four fixtures now go through `installed_units.write_unit`, the one writer of a managed installed unit, so the suite's clean/drift scenes no longer depend on the caller's umask. Verified: the four suites pass under `umask 002`.
Contributor
Author
|
✅ Orbi 已交付 · 查看交付证明 → |
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 #2455
Install systemd unit templates with an explicit safe mode (run_id=4d761d28)
Built by Orbi from Issue #2455