mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Add simple API for token assignment reporting.
This commit is contained in:
committed by
Milan Broz
parent
7378e3be01
commit
f3a9e95dd8
10
lib/setup.c
10
lib/setup.c
@@ -4274,6 +4274,16 @@ int crypt_token_unassign_keyslot(struct crypt_device *cd, int token, int keyslot
|
||||
return LUKS2_token_assign(cd, &cd->u.luks2.hdr, keyslot, token, 0, 1);
|
||||
}
|
||||
|
||||
int crypt_token_is_assigned(struct crypt_device *cd, int token, int keyslot)
|
||||
{
|
||||
int r;
|
||||
|
||||
if ((r = _onlyLUKS2(cd, CRYPT_CD_QUIET | CRYPT_CD_UNRESTRICTED)))
|
||||
return r;
|
||||
|
||||
return LUKS2_token_is_assigned(cd, &cd->u.luks2.hdr, keyslot, token);
|
||||
}
|
||||
|
||||
/* Internal only */
|
||||
int crypt_metadata_locking_enabled(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user