summaryrefslogtreecommitdiffstats
path: root/src/cryptsetup/cryptsetup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-08-19 11:33:41 +0200
committerLennart Poettering <lennart@poettering.net>2022-08-19 14:53:54 +0200
commita0789e5fb89fbf8cb424b0410d91f5910f4a0efa (patch)
tree9d5f584a72abfc88df8b4081f3cbbe7ff844dee2 /src/cryptsetup/cryptsetup.c
parentcryptsetup: use right internal helper when checking whether to use tokens (diff)
downloadsystemd-a0789e5fb89fbf8cb424b0410d91f5910f4a0efa.tar.xz
systemd-a0789e5fb89fbf8cb424b0410d91f5910f4a0efa.zip
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.
Diffstat (limited to '')
-rw-r--r--src/cryptsetup/cryptsetup.c2
1 files changed, 1 insertions, 1 deletions
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,