mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Make luksErase work with detached header.
For it to work correctly with LUKS2 OPAL we have to set data device properly so it can erase OPAL locking range (or revert via PSID).
This commit is contained in:
@@ -2722,8 +2722,8 @@ static int action_luksErase(void)
|
||||
char *msg = NULL;
|
||||
int i, max, r, hw_enc;
|
||||
|
||||
if ((r = crypt_init(&cd, uuid_or_device_header(NULL))))
|
||||
goto out;
|
||||
if ((r = crypt_init_data_device(&cd, uuid_or_device(ARG_STR(OPT_HEADER_ID) ?: action_argv[0]), action_argv[0])))
|
||||
return r;
|
||||
|
||||
/* Allow factory reset even if there's no LUKS header, as long as OPAL is enabled on the device */
|
||||
if (ARG_SET(OPT_HW_OPAL_FACTORY_RESET_ID)) {
|
||||
|
||||
Reference in New Issue
Block a user