mirror of
https://github.com/systemd/systemd
synced 2026-04-26 08:54:50 +02:00
Compare commits
No commits in common. "127927b2c218e594950b8c699d08570c66650234" and "2338b8f9c56e0b14f25e8633f6e8e636e68638c8" have entirely different histories.
127927b2c2
...
2338b8f9c5
4
TODO
4
TODO
@ -171,10 +171,6 @@ Features:
|
||||
so that we might even open up up the random seed logic to non-SecureBoot
|
||||
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-device has an API to create an sd_device object from a device id, but has
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
#include "parse-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "tpm2-util.h"
|
||||
#include "virt.h"
|
||||
|
||||
#if HAVE_TPM2
|
||||
#include "alloc-util.h"
|
||||
@ -1461,18 +1460,12 @@ Tpm2Support tpm2_support(void) {
|
||||
Tpm2Support support = TPM2_SUPPORT_NONE;
|
||||
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");
|
||||
if (r < 0) {
|
||||
if (r != -ENOENT)
|
||||
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! */
|
||||
support |= TPM2_SUPPORT_DRIVER;
|
||||
}
|
||||
r = dir_is_empty("/sys/class/tpmrm");
|
||||
if (r < 0) {
|
||||
if (r != -ENOENT)
|
||||
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! */
|
||||
support |= TPM2_SUPPORT_DRIVER;
|
||||
|
||||
if (efi_has_tpm2())
|
||||
support |= TPM2_SUPPORT_FIRMWARE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user