mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Switch to volume key keyring helpers.
And do not access volume key internals bearing information whether the key payload was uploaded in kernel keyring or not.
This commit is contained in:
committed by
Milan Broz
parent
15c4a410fd
commit
0a6ee8633a
@@ -2894,8 +2894,7 @@ int LUKS2_deactivate(struct crypt_device *cd, const char *name, struct luks2_hdr
|
||||
tgt = &dmdc.segment;
|
||||
while (tgt) {
|
||||
if (tgt->type == DM_CRYPT)
|
||||
crypt_unlink_key_by_description_from_thread_keyring(cd, crypt_volume_key_description(tgt->u.crypt.vk),
|
||||
LOGON_KEY);
|
||||
crypt_volume_key_drop_kernel_key(cd, tgt->u.crypt.vk);
|
||||
tgt = tgt->next;
|
||||
}
|
||||
}
|
||||
@@ -2930,8 +2929,7 @@ int LUKS2_deactivate(struct crypt_device *cd, const char *name, struct luks2_hdr
|
||||
tgt = &dmdc.segment;
|
||||
while (tgt) {
|
||||
if (tgt->type == DM_CRYPT)
|
||||
crypt_unlink_key_by_description_from_thread_keyring(cd, crypt_volume_key_description(tgt->u.crypt.vk),
|
||||
LOGON_KEY);
|
||||
crypt_volume_key_drop_kernel_key(cd, tgt->u.crypt.vk);
|
||||
tgt = tgt->next;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user