mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Do not drop keys from keyring on successfull reencryption recovery.
The key might be needed in activation of ordinary LUKS2 device provided the recovery took place in before device activation and actually finished LUKS2 device reencryption. Fixes: #863.
This commit is contained in:
@@ -4463,7 +4463,8 @@ int LUKS2_reencrypt_locked_recovery_by_vks(struct crypt_device *cd,
|
||||
r = reencrypt_recovery(cd, hdr, device_size, vks);
|
||||
|
||||
out:
|
||||
crypt_drop_keyring_key(cd, vks);
|
||||
if (r < 0)
|
||||
crypt_drop_keyring_key(cd, vks);
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user