]> git.ipfire.org Git - thirdparty/grub.git/commit
disk/luks2: Continue trying all keyslots even if there are some failures
authorGlenn Washburn <development@efficientek.com>
Fri, 22 Jul 2022 08:04:50 +0000 (03:04 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 10 Aug 2022 12:24:46 +0000 (14:24 +0200)
commita768876c0df0c9258e9c7502cdb54675eeb5f7ec
tree846f2ff9034b5b966b575111f27c9add8b4552b6
parent294c0501e918c4bdea2f9fba02564865b1714655
disk/luks2: Continue trying all keyslots even if there are some failures

luks2_get_keyslot() can fail for a variety of reasons that do not necessarily
mean the next keyslot should not be tried (e.g. a new kdf type). So always
try the next slot. This will make GRUB more resilient to non-spec json data
that 3rd party systems may add. We do not care if some of the keyslots are
unusable, only if there is at least one that is.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/luks2.c