]> git.ipfire.org Git - thirdparty/grub.git/commit
cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules
authorGlenn Washburn <development@efficientek.com>
Thu, 9 Dec 2021 17:14:55 +0000 (11:14 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Dec 2021 01:08:17 +0000 (02:08 +0100)
commitbe62f0836c38c47c24cc8b7876a418706cac416e
tree7b2d4807cbfaa2a568e742db14407d3b65d83534
parente1d22da580b75b7de19e8a8373546da788b5f51c
cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules

Previously, the cryptomount arguments were passed by global variable and
function call argument, neither of which are ideal. This change passes data
via a grub_cryptomount_args struct, which can be added to over time as
opposed to continually adding arguments to the cryptodisk scan and
recover_key.

As an example, passing a password as a cryptomount argument is implemented.
However, the backends are not implemented, so testing this will return a not
implemented error.

Also, add comments to cryptomount argument parsing to make it more obvious
which argument states are being handled.

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