From: Lennart Poettering Date: Fri, 19 Aug 2022 09:33:41 +0000 (+0200) Subject: cryptsetup: make sure all token-based codepaths are effected by SYSTEMD_CRYPTSETUP_US... X-Git-Tag: v252-rc1~412 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0789e5fb89fbf8cb424b0410d91f5910f4a0efa;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 2353e5c5eea..e190f90579d 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,