[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 3/9] cryptodisk: Return failure in cryptomount when no cryptod
From: |
Glenn Washburn |
Subject: |
[PATCH v5 3/9] cryptodisk: Return failure in cryptomount when no cryptodisk modules are loaded |
Date: |
Thu, 9 Dec 2021 11:14:52 -0600 |
This displays an error notifying the user that they'll want to load a
backend module to make cryptomount useful.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/disk/cryptodisk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c
index 9df3d310f..27491871a 100644
--- a/grub-core/disk/cryptodisk.c
+++ b/grub-core/disk/cryptodisk.c
@@ -1125,6 +1125,9 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int
argc, char **args)
if (argc < 1 && !state[1].set && !state[2].set)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+ if (grub_cryptodisk_list == NULL)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no cryptodisk modules loaded");
+
if (state[0].set)
{
int found_uuid;
--
2.27.0
- [PATCH v5 0/9] Refactor/improve cryptomount data passing to crypto modules, Glenn Washburn, 2021/12/09
- [PATCH v5 1/9] luks2: Add debug message to align with luks and geli modules, Glenn Washburn, 2021/12/09
- [PATCH v5 2/9] cryptodisk: Refactor to discard have_it global, Glenn Washburn, 2021/12/09
- [PATCH v5 4/9] cryptodisk: Improve error messaging in cryptomount invocations, Glenn Washburn, 2021/12/09
- [PATCH v5 3/9] cryptodisk: Return failure in cryptomount when no cryptodisk modules are loaded,
Glenn Washburn <=
- [PATCH v5 5/9] cryptodisk: Improve cryptomount -u error message, Glenn Washburn, 2021/12/09
- [PATCH v5 7/9] cryptodisk: Refactor password input out of crypto dev modules into cryptodisk, Glenn Washburn, 2021/12/09
- [PATCH v5 6/9] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules, Glenn Washburn, 2021/12/09
- [PATCH v5 8/9] cryptodisk: Move global variables into grub_cryptomount_args struct, Glenn Washburn, 2021/12/09
- [PATCH v5 9/9] cryptodisk: Improve handling of partition name in cryptomount password prompt, Glenn Washburn, 2021/12/09