mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-21 15:50:16 +01:00
committed by
Milan Broz
parent
71f33418d2
commit
161eeb7473
@@ -659,16 +659,18 @@ static int action_reencrypt_luks2(struct crypt_device *cd, const char *data_devi
|
|||||||
|
|
||||||
r = _check_luks2_keyslots(cd, vk_change);
|
r = _check_luks2_keyslots(cd, vk_change);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
goto out;
|
||||||
|
|
||||||
r = crypt_keyslot_max(CRYPT_LUKS2);
|
r = crypt_keyslot_max(CRYPT_LUKS2);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
goto out;
|
||||||
kp_size = r;
|
kp_size = r;
|
||||||
|
|
||||||
kp = init_keyslot_passwords(kp_size);
|
kp = init_keyslot_passwords(kp_size);
|
||||||
if (!kp)
|
if (!kp) {
|
||||||
return -ENOMEM;
|
r = -ENOMEM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
r = fill_keyslot_passwords(cd, kp, kp_size, vk_change);
|
r = fill_keyslot_passwords(cd, kp, kp_size, vk_change);
|
||||||
if (r)
|
if (r)
|
||||||
|
|||||||
Reference in New Issue
Block a user