Do not check passphrase quality in-before erase.

The passphrase (Admin PIN) already exists and there's no
reason to check quiality of it.
This commit is contained in:
Ondrej Kozina
2024-04-03 13:45:22 +02:00
committed by Milan Broz
parent e17ec37341
commit 0cbeb35a93

View File

@@ -3039,8 +3039,7 @@ static int opal_erase(struct crypt_device *cd, bool factory_reset) {
r = tools_get_key(factory_reset ? _("Enter OPAL PSID: ") : _("Enter OPAL Admin password: "), r = tools_get_key(factory_reset ? _("Enter OPAL PSID: ") : _("Enter OPAL Admin password: "),
&password, &password_size, ARG_UINT64(OPT_KEYFILE_OFFSET_ID), &password, &password_size, ARG_UINT64(OPT_KEYFILE_OFFSET_ID),
ARG_UINT32(OPT_KEYFILE_SIZE_ID), ARG_STR(OPT_KEY_FILE_ID), ARG_UINT32(OPT_KEYFILE_SIZE_ID), ARG_STR(OPT_KEY_FILE_ID),
ARG_UINT32(OPT_TIMEOUT_ID), verify_passphrase(0), ARG_UINT32(OPT_TIMEOUT_ID), verify_passphrase(0), 0, cd);
!ARG_SET(OPT_FORCE_PASSWORD_ID), cd);
if (r < 0) if (r < 0)
return r; return r;