mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Return error on conflicting keyring requests.
Add missing check in crypt_activate_by_token. An oversight from previous patch.
This commit is contained in:
committed by
Milan Broz
parent
cd65f6a84d
commit
05f665ecda
@@ -4042,6 +4042,9 @@ int crypt_activate_by_token(struct crypt_device *cd,
|
||||
if ((r = _onlyLUKS2(cd, CRYPT_CD_QUIET | CRYPT_CD_UNRESTRICTED)))
|
||||
return r;
|
||||
|
||||
if ((flags & CRYPT_ACTIVATE_KEYRING_KEY) && !crypt_use_keyring_for_vk(cd))
|
||||
return -EINVAL;
|
||||
|
||||
if (token == CRYPT_ANY_TOKEN)
|
||||
return LUKS2_token_open_and_activate_any(cd, &cd->u.luks2.hdr, name, flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user