]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: make sure all token-based codepaths are effected by SYSTEMD_CRYPTSETUP_US...
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Aug 2022 09:33:41 +0000 (11:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Aug 2022 12:53:54 +0000 (14:53 +0200)
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

index 2353e5c5eeacb9c8479d30d65f4a9413b696dc7e..e190f90579d75f807d0e908194b14a98cb83937a 100644 (file)
@@ -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,