pcrlock: ignore empty device path
Don't mark records with empty device path as invalid. When shim is in use such records are normal :-/ https://github.com/rhboot/shim/issues/642
This commit is contained in:
@@ -830,6 +830,16 @@ static int event_log_record_extract_firmware_description(EventLogRecord *rec) {
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
/* device path could be empty. Don't mark that as invalid but leave as don't know.
|
||||
* Happens eg with shim https://github.com/rhboot/shim/issues/642 */
|
||||
if (load->lengthOfDevicePath == 0) {
|
||||
rec->description = strdup("File: <unspecified>");
|
||||
if (!rec->description)
|
||||
return log_oom();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
const packed_EFI_DEVICE_PATH *dp = (const packed_EFI_DEVICE_PATH*) load->devicePath;
|
||||
size_t left = load->lengthOfDevicePath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user