mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 20:30:04 +01:00
Do not fail reencryption silently when --active-name is not LUKS2.
This commit is contained in:
@@ -3103,9 +3103,8 @@ static int action_reencrypt(void)
|
||||
|
||||
if (!opt_encrypt || opt_reencrypt_resume_only) {
|
||||
if (opt_active_name) {
|
||||
if ((r = crypt_init_by_name_and_header(&cd, opt_active_name, opt_header_device)))
|
||||
return r;
|
||||
if (!crypt_get_type(cd) || strcmp(crypt_get_type(cd), CRYPT_LUKS2)) {
|
||||
r = crypt_init_by_name_and_header(&cd, opt_active_name, opt_header_device);
|
||||
if (r || !crypt_get_type(cd) || strcmp(crypt_get_type(cd), CRYPT_LUKS2)) {
|
||||
log_err(_("Device %s is not a valid LUKS device."), opt_active_name);
|
||||
r = -EINVAL;
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user