pcrlock: don't fail if firmware measurements aren't available

With swtpm in place we now commonly have systems where TPM is available
during runtime, but not in the firmware. Handle that nicely.
This commit is contained in:
Lennart Poettering
2026-03-26 16:11:34 +01:00
parent cd911bec6e
commit 1494cb04ea
+4
View File
@@ -899,6 +899,10 @@ static int event_log_load_firmware(EventLog *el) {
path = tpm2_firmware_log_path();
r = read_full_file(path, (char**) &buf, &bufsize);
if (r == -ENOENT) {
log_notice("No '%s' file, assuming TPM without firmware support.", path);
return 0;
}
if (r < 0)
return log_error_errno(r, "Failed to open TPM2 event log '%s': %m", path);