mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 14:20:09 +01:00
Add API and CLI option to disable token plugins.
This could be useful for debugging external plugins or ot intentionally disable loading of a token library.
This commit is contained in:
@@ -3503,6 +3503,9 @@ static void help(poptContext popt_context,
|
||||
log_std(_("\nDefault compiled-in metadata format is %s (for luksFormat action).\n"),
|
||||
crypt_get_default_type());
|
||||
|
||||
log_std(_("\nLUKS2 external token plugin support is %s.\n"),
|
||||
crypt_token_external_support() ? _("disabled") : _("compiled-in"));
|
||||
|
||||
pbkdf_luks1 = crypt_get_pbkdf_default(CRYPT_LUKS1);
|
||||
pbkdf_luks2 = crypt_get_pbkdf_default(CRYPT_LUKS2);
|
||||
log_std(_("\nDefault compiled-in key and passphrase parameters:\n"
|
||||
@@ -3991,6 +3994,9 @@ int main(int argc, const char **argv)
|
||||
if (ARG_SET(OPT_DISABLE_KEYRING_ID))
|
||||
(void) crypt_volume_key_keyring(NULL, 0);
|
||||
|
||||
if (ARG_SET(OPT_DISABLE_EXTERNAL_TOKENS_ID))
|
||||
(void) crypt_token_external_disable();
|
||||
|
||||
if (ARG_SET(OPT_DISABLE_LOCKS_ID) && crypt_metadata_locking(NULL, 0)) {
|
||||
log_std(_("Cannot disable metadata locking."));
|
||||
r = EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user