efi: Allow some cert-related UEFI variables to not be present
Subsystems (4)
PATCH 1/1 efi: Allow some cert-related UEFI variables to not be present
From: Ignat Loskutov <[email protected]>
get_cert_list() prints an error message if no UEFI variable exists with the given name. However, the calling code doesn't always consider this an error. Fix by returning silently in this case.
Signed-off-by Ignat Loskutov <[email protected]>
--- security/integrity/platform_certs/load_uefi.c | 2 ++ 1 file changed, 2 insertions(+)
security/integrity/platform_certs/load_uefi.c +2 -0
@@ -43,6 +43,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,void *db; status = efi.get_variable (name, guid,NULL , &lsize, &tmpdb); +if (status ==EFI_NOT_FOUND ) +return NULL ;if (status !=EFI_BUFFER_TOO_SMALL ) {pr_err ("Couldn't get size: 0x%lx\n" , status);return NULL ;
Signature · 1 line
2.20.1