Simplify bitlk activation by volume key.

Let's not copy volume key again when not necessary.
This commit is contained in:
Ondrej Kozina
2024-10-29 15:20:16 +01:00
parent 5b83ae8ec2
commit f85c31677c
3 changed files with 5 additions and 16 deletions

View File

@@ -5623,8 +5623,7 @@ static int _activate_by_volume_key(struct crypt_device *cd,
cd->u.integrity.sb_flags);
} else if (isBITLK(cd->type)) {
assert(!external_key);
r = BITLK_activate_by_volume_key(cd, name, vk->key, vk->keylength,
&cd->u.bitlk.params, flags);
r = BITLK_activate_by_volume_key(cd, name, vk, &cd->u.bitlk.params, flags);
} else if (isFVAULT2(cd->type)) {
assert(!external_key);
assert(crypt_volume_key_get_id(vk) == KEY_VERIFIED);