cryptsetup: ask for PIN when trying to activate using a LUKS2 token plugin
authorJonas Witschel <diabonas@archlinux.org>
Wed, 25 May 2022 12:06:12 +0000 (14:06 +0200)
committerJonas Witschel <diabonas@archlinux.org>
Fri, 5 Aug 2022 10:22:27 +0000 (12:22 +0200)
commitee6c66acc5a61cb56f9b1d6e3132728c4d1ce66d
tree8c825efb34628cf4d4b27f5a5238d3f59026e311
parent89db47550d137d2e120f9e7002d831591eaa269f
cryptsetup: ask for PIN when trying to activate using a LUKS2 token plugin

crypt_activate_by_token() fails with ENOANO if the token is protected with a
PIN, in this case we need to call crypt_activate_by_token_pin() with a PIN.
This logic is already implemented in
crypt_activate_by_token_pin_ask_password().

This code path is relevant when using systemd-gpt-auto-generator because there
is no a priory information about the type of the used security device, so
systemd-cryptsetup tries to unlock the volume using the corresponding
cryptsetup plugin.
src/cryptsetup/cryptsetup.c