Reencryption keyslot must report as unbound.

This commit is contained in:
Ondrej Kozina
2019-07-02 16:07:43 +02:00
parent bda28bbf38
commit 61dff96474

View File

@@ -271,7 +271,8 @@ crypt_keyslot_info LUKS2_keyslot_info(struct luks2_hdr *hdr, int keyslot)
if (!LUKS2_get_keyslot_jobj(hdr, keyslot))
return CRYPT_SLOT_INACTIVE;
if (LUKS2_keyslot_unbound(hdr, keyslot))
if (LUKS2_digest_by_keyslot(hdr, keyslot) < 0 ||
LUKS2_keyslot_unbound(hdr, keyslot))
return CRYPT_SLOT_UNBOUND;
if (LUKS2_keyslot_active_count(hdr, CRYPT_DEFAULT_SEGMENT) == 1 &&