Repository navigation
Harden Backmaster systemd services - #4
Merged
Merged
Conversation
SakuraIsayeki
force-pushed
the
hardening/systemd-dropin
branch
from
November 8, 2026 13:00
551f704 to
db78616
Compare
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.
Summary
Install a shared vendor systemd drop-in for both backup and health service templates. The existing service identities and configured backup, staging, and exporter paths remain unchanged.
CapabilityBoundingSet=removes Linux capabilities;LockPersonality=yeslocks the execution domain.ProtectKernelTunables=yes,ProtectKernelModules=yes, andProtectControlGroups=yesrestrict changes to host kernel and cgroup settings.RestrictRealtime=yesblocks realtime scheduling andRestrictSUIDSGID=yesblocks setting set-ID file bits. The backup unit already had the latter; the shared drop-in also covers health checks.The sandbox applies to the services and their children, not manual CLI calls or PostgreSQL archive/restore commands running under the database service. It does not isolate data or other processes belonging to the same service account.
Validation
git diff --checkpassed.systemd-analyze verifyon systemd 257 loaded both template drop-ins with test copies using/bin/truein place of the unavailable installed executable.