]> git.ipfire.org Git - thirdparty/grub.git/commit
cryptodisk: Fallback to passphrase
authorPatrick Colp <patrick.colp@oracle.com>
Fri, 15 Nov 2024 07:34:56 +0000 (15:34 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 28 Nov 2024 20:50:55 +0000 (21:50 +0100)
commit6abf8af3c54abc04c4ec71c75d10fcfbc190e181
tree7bfb06ce2d4439a46dbda5d7f16dad9a7677d5df
parentfba3a474e00ca10d6ec29ed4667de8911e4068e5
cryptodisk: Fallback to passphrase

If a protector is specified, but it fails to unlock the disk, fall back
to asking for the passphrase.

Before requesting the passphrase, the error from the key protector(s)
has to be cleared, or the later code, e.g., LUKS code, may stop as
grub_errno is set. This commit prints error from the key protector(s)
and sets grub_errno to GRUB_ERR_NONE to have a fresh start.

Signed-off-by: Patrick Colp <patrick.colp@oracle.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
grub-core/disk/cryptodisk.c