units: add ConditionSecurity=tpm2 to systemd-tpm2-setup units
authorLuca Boccassi <bluca@debian.org>
Thu, 28 Dec 2023 16:32:06 +0000 (17:32 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 28 Dec 2023 18:14:34 +0000 (03:14 +0900)
commitaa735b02196cf6f947fd1e4b2ec46b544ec7c3e1
tree42df0fe77a52a4f0f59f6dc9f067f41ba0742fea
parentc6dcd70a37c19323eab98c3b8eb799b769056a72
units: add ConditionSecurity=tpm2 to systemd-tpm2-setup units

ConditionSecurity=measured-uki can be true even with TPM 1.2 which we
don't support, so add an explicit check for TPM 2.0.

Fixes https://github.com/systemd/systemd/issues/30650

Follow-up for 2e64cb71b9c0160c3
units/systemd-tpm2-setup-early.service.in
units/systemd-tpm2-setup.service.in