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:
Milan Broz
2021-06-13 20:32:40 +02:00
parent f79ef935a7
commit df5e54545e
8 changed files with 40 additions and 10 deletions

View File

@@ -2256,11 +2256,17 @@ int crypt_token_register(const crypt_token_handler *handler);
/**
* Report external token handlers (plugins) support
*
* @return @e 0 when enabled or negative errno value otherwise.
*/
int crypt_token_external_support(void);
/**
* Disable external token handlers (plugins) support
* If disabled, it cannot be enabled again.
*/
void crypt_token_external_disable(void);
/** ABI version for external token in libcryptsetup-token-<name>.so */
#define CRYPT_TOKEN_ABI_VERSION1 "CRYPTSETUP_TOKEN_1.0"