diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-11-29 18:52:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-12-06 22:10:20 +0100 |
commit | ffc1ec73b3a271d8ed59b3aef18cc5b42ec76579 (patch) | |
tree | c169047464b298328fc499e8a56421bbd3049c55 /tmpfiles.d | |
parent | Merge pull request #30241 from poettering/journalctl-short-file-switch (diff) | |
download | systemd-ffc1ec73b3a271d8ed59b3aef18cc5b42ec76579.tar.xz systemd-ffc1ec73b3a271d8ed59b3aef18cc5b42ec76579.zip |
pid1: add ProtectSystem= as system-wide configuration, and default it to true in the initrd
This adds a new ProtectSystem= setting that mirrors the option of the
same of services, but in a more restrictive way. If enabled will remount
/usr/ to read-only, very early at boot. Takes a special value "auto"
(which is the default) which is equivalent to true in the initrd, and
false otherwise.
Unlike the per-service option we don't support full/strict modes, but
the door is open to eventually support that too if it makes sense. It's
not entirely trivial though as we have very little mounted this early,
and hence the mechanism might not apply 1:1. Hence in this PR is a
conservative first step.
My primary goal with this is to lock down initrds a bit, since they
conceptually are mostly immutable, but they are unpacked into a mutable
tmpfs. let's tighten the screws a bit on that, and at least make /usr/
immutable.
This is particularly nice on USIs (i.e. Unified System Images, that pack
a whole OS into a UKI without transitioning out of it), such as
diskomator.
Diffstat (limited to 'tmpfiles.d')
0 files changed, 0 insertions, 0 deletions