1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-23 02:04:32 +03:00
Lennart Poettering 6c51b49ce0 tpm2: add common helper for checking if we are running on UKI with TPM measurements
Let's introduce a common implementation of a function that checks
whether we are booted on a kernel with systemd-stub that has TPM PCR
measurements enabled. Do our own userspace measurements only if we
detect that.

PCRs are scarce and most likely there are projects which already make
use of them in other ways. Hence, instead of blindly stepping into their
territory let's conditionalize things so that people have to explicitly
buy into our PCR assignments before we start measuring things into them.
Specifically bind everything to an UKI that reported measurements.

This was previously already implemented in systemd-pcrphase, but with
this change we expand this to all tools that process PCR measurement
settings.

The env var to override the check is renamed to SYSTEMD_FORCE_MEASURE,
to make it more generic (since we'll use it at multiple places now).
This is not a compat break, since the original env var for that was not
included in any stable release yet.
2023-01-17 09:42:16 +01:00
..
2022-05-17 23:00:18 +02:00
2022-05-17 23:00:18 +02:00
2019-12-11 17:04:20 +01:00
2022-01-12 16:05:59 +01:00
2022-12-09 15:37:43 +01:00
2022-06-28 16:05:31 +02:00
2019-12-11 17:04:20 +01:00
2022-05-18 20:34:10 +02:00
2022-05-18 20:34:10 +02:00
2022-06-28 16:05:31 +02:00
2022-12-10 11:26:36 +01:00
2022-11-22 01:30:03 +01:00
2022-06-28 16:05:31 +02:00