mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 22:30:07 +01:00
Replace original token activation retcode -EAGAIN with -ENOANO.
crypt_activate_by_token (and _pin variant) now returns -ENOANO instead -EAGAIN in case token handler identifies specific token requires PIN to sucessfully complete token based activation. -EAGAIN is now used for special case when additional system resources are missing (HW token, other device, system daemon, etc).
This commit is contained in:
@@ -1538,7 +1538,7 @@ static int action_open_luks(void)
|
||||
tools_keyslot_msg(r, UNLOCKED);
|
||||
|
||||
/* Token requires PIN, but ask only there will be no password query later */
|
||||
if (ARG_SET(OPT_TOKEN_ONLY_ID) && r == -EAGAIN) {
|
||||
if (ARG_SET(OPT_TOKEN_ONLY_ID) && r == -ENOANO) {
|
||||
r = tools_get_key(_("Enter token PIN:"), &password, &passwordLen, 0, 0, NULL,
|
||||
ARG_UINT32(OPT_TIMEOUT_ID), _verify_passphrase(0), 0, cd);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user