bootctl: report if have been booted with a measured UKI

Just expose the result of efi_measured_uki() to the user.
This commit is contained in:
Lennart Poettering
2023-09-28 10:33:00 +02:00
parent 89e7b9652b
commit fa1f3aec33
+10
View File
@@ -420,6 +420,16 @@ int verb_status(int argc, char *argv[], void *userdata) {
(s & TPM2_SUPPORT_DRIVER) ? "driver only, firmware unavailable" : "no",
ansi_normal());
k = efi_measured_uki(LOG_DEBUG);
if (k > 0)
printf(" Measured UKI: %syes%s\n", ansi_highlight_green(), ansi_normal());
else if (k == 0)
printf(" Measured UKI: no\n");
else {
errno = -k;
printf(" Measured UKI: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
}
k = efi_get_reboot_to_firmware();
if (k > 0)
printf(" Boot into FW: %sactive%s\n", ansi_highlight_yellow(), ansi_normal());