mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-19 14:50:09 +01:00
Do not fallback to pasphrase based activation when device exists.
If token based device activation activation fails with -EEXIST report proper error and do not fallback to passphrase based activation in cli.
This commit is contained in:
committed by
Milan Broz
parent
3b826d0fa3
commit
f364990b9b
@@ -1588,7 +1588,7 @@ static int action_open_luks(void)
|
||||
if (ARG_SET(OPT_TOKEN_ONLY_ID) && r == -ENOANO)
|
||||
r = _try_token_pin_unlock(cd, ARG_INT32(OPT_TOKEN_ID_ID), activated_name, ARG_STR(OPT_TOKEN_TYPE_ID), activate_flags, _set_tries_tty());
|
||||
|
||||
if (r >= 0 || ARG_SET(OPT_TOKEN_ONLY_ID))
|
||||
if (r >= 0 || r == -EEXIST || ARG_SET(OPT_TOKEN_ONLY_ID))
|
||||
goto out;
|
||||
|
||||
tries = _set_tries_tty();
|
||||
|
||||
Reference in New Issue
Block a user