mirror of
https://github.com/systemd/systemd
synced 2026-04-25 16:34:50 +02:00
Compare commits
2 Commits
2338b8f9c5
...
127927b2c2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
127927b2c2 | ||
|
|
44d5dd655e |
4
TODO
4
TODO
@ -171,6 +171,10 @@ Features:
|
|||||||
so that we might even open up up the random seed logic to non-SecureBoot
|
so that we might even open up up the random seed logic to non-SecureBoot
|
||||||
systems?
|
systems?
|
||||||
|
|
||||||
|
* sd-boot: also include the hyperv "vm generation id" in the random seed hash,
|
||||||
|
to cover nicely for machine clones. It's found in the ACPI tables, which
|
||||||
|
should be easily accessible from UEFI.
|
||||||
|
|
||||||
* sd-boot: add menu item for shutdown? or hotkey?
|
* sd-boot: add menu item for shutdown? or hotkey?
|
||||||
|
|
||||||
* sd-device has an API to create an sd_device object from a device id, but has
|
* sd-device has an API to create an sd_device object from a device id, but has
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "stat-util.h"
|
#include "stat-util.h"
|
||||||
#include "tpm2-util.h"
|
#include "tpm2-util.h"
|
||||||
|
#include "virt.h"
|
||||||
|
|
||||||
#if HAVE_TPM2
|
#if HAVE_TPM2
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
@ -1460,12 +1461,18 @@ Tpm2Support tpm2_support(void) {
|
|||||||
Tpm2Support support = TPM2_SUPPORT_NONE;
|
Tpm2Support support = TPM2_SUPPORT_NONE;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
if (detect_container() <= 0) {
|
||||||
|
/* Check if there's a /dev/tpmrm* device via sysfs. If we run in a container we likely just
|
||||||
|
* got the host sysfs mounted. Since devices are generally not virtualized for containers,
|
||||||
|
* let's assume containers never have a TPM, at least for now. */
|
||||||
|
|
||||||
r = dir_is_empty("/sys/class/tpmrm");
|
r = dir_is_empty("/sys/class/tpmrm");
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
if (r != -ENOENT)
|
if (r != -ENOENT)
|
||||||
log_debug_errno(r, "Unable to test whether /sys/class/tpmrm/ exists and is populated, assuming it is not: %m");
|
log_debug_errno(r, "Unable to test whether /sys/class/tpmrm/ exists and is populated, assuming it is not: %m");
|
||||||
} else if (r == 0) /* populated! */
|
} else if (r == 0) /* populated! */
|
||||||
support |= TPM2_SUPPORT_DRIVER;
|
support |= TPM2_SUPPORT_DRIVER;
|
||||||
|
}
|
||||||
|
|
||||||
if (efi_has_tpm2())
|
if (efi_has_tpm2())
|
||||||
support |= TPM2_SUPPORT_FIRMWARE;
|
support |= TPM2_SUPPORT_FIRMWARE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user