mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Do not attempt to unload external tokens if USE_EXTERNAL_TOKENS is disabled.
This allows building a static binary as long as --disable-external-tokens is used
This commit is contained in:
@@ -245,6 +245,7 @@ int crypt_token_register(const crypt_token_handler *handler)
|
|||||||
|
|
||||||
void crypt_token_unload_external_all(struct crypt_device *cd)
|
void crypt_token_unload_external_all(struct crypt_device *cd)
|
||||||
{
|
{
|
||||||
|
#if USE_EXTERNAL_TOKENS
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = LUKS2_TOKENS_MAX - 1; i >= 0; i--) {
|
for (i = LUKS2_TOKENS_MAX - 1; i >= 0; i--) {
|
||||||
@@ -258,6 +259,7 @@ void crypt_token_unload_external_all(struct crypt_device *cd)
|
|||||||
if (dlclose(CONST_CAST(void *)token_handlers[i].u.v2.dlhandle))
|
if (dlclose(CONST_CAST(void *)token_handlers[i].u.v2.dlhandle))
|
||||||
log_dbg(cd, "%s", dlerror());
|
log_dbg(cd, "%s", dlerror());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static const void
|
static const void
|
||||||
|
|||||||
Reference in New Issue
Block a user