From a0789e5fb89fbf8cb424b0410d91f5910f4a0efa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Aug 2022 11:33:41 +0200 Subject: cryptsetup: make sure all token-based codepaths are effected by SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE env var Previously the env var was only checked when conditionalizing use of our own libcryptsetup loadable token modules. But let's also use it for any other kind of token module, including possible internal ones by libcryptsetup. --- src/cryptsetup/cryptsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptsetup/cryptsetup.c') diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 2353e5c5ee..e190f90579 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -1885,7 +1885,7 @@ static int run(int argc, char *argv[]) { } /* Tokens are available in LUKS2 only, but it is ok to call (and fail) with LUKS1. */ - if (!key_file && !key_data) { + if (!key_file && !key_data && getenv_bool("SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE") != 0) { r = crypt_activate_by_token_pin_ask_password( cd, volume, -- cgit v1.2.3