rhboot / shim

UEFI shim loader
Other
861 stars 291 forks source link

Fix preserve_sbat_uefi_variable() logic #478

Closed jsetje closed 2 years ago

jsetje commented 2 years ago

preserve_sbat_uefi_variable() shoud really deal with the sbat metadata version as a numerical value that could gain more digits.

It also needs to only compare the datestamp since the actual metadata can grow and shrink

Signed-off-by: Jan Setje-Eilers Jan.SetjeEilers@oracle.com

jsetje commented 2 years ago

I should probably just use pointer match in place of the substitution and strlen()s. I'll update as soon as I get through re-testing. Also fixing a minor bug in the test code.

jsetje commented 2 years ago

And now I got my test system into a strange state. Likely just bad test metadata, but need to confirm. Edit: Confirmed as pilot error. The system works as designed. So many ways to shoot yourself in the foot with this.