]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2-util: look for tpm2-pcr-signature.json directly in /.extra/
authorLennart Poettering <lennart@poettering.net>
Thu, 22 Jun 2023 14:26:15 +0000 (16:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Jun 2023 07:32:33 +0000 (09:32 +0200)
commit6270b2e67edbe5c9ac164fc3f2f1cd1d7832fcd8
tree5f9bbed66261c71c9b91d557f313b97e5f2498aa
parent19b761a097041c2b7adb803fd755940ca2631f13
tpm2-util: look for tpm2-pcr-signature.json directly in /.extra/

So far we relied on tmpfiles.d to copy tpm2-pcr-signature.json from
/.extra/ into /run/systemd/. This is racy however if cryptsetup runs too
early, and we cannot unconditionally run it after tmpfiles completed.

hence, let's teach cryptsetup to directly look for the file in /.extra/,
in order to simplify this, and remove the race. But do so only in the
initrd (as only there /.extra/ is a concept).

We generally prefer looking in /run/systemd/, since things are under
user control then. In the regular system we exclusively want that
userspace looks there.

Fixes: #26490
src/shared/tpm2-util.c