From: Dan Streetman Date: Fri, 21 Jul 2023 14:45:16 +0000 (-0400) Subject: Revert "cryptenroll: drop unmet condition" X-Git-Tag: v254-rc3~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adb7fe82c770a81cf510f8c1b2de51ad08ba88de;p=thirdparty%2Fsystemd.git Revert "cryptenroll: drop unmet condition" This reverts commit cefa4a02ab8f3c941e54b5ad1a90b5cf133264a7. Because the first 'break' is inside a nested for loop, this second 'break' is needed to exit the outer for loop. Fixes: #28451 --- diff --git a/src/cryptenroll/cryptenroll-password.c b/src/cryptenroll/cryptenroll-password.c index 499dbbc627a..9deb98f202f 100644 --- a/src/cryptenroll/cryptenroll-password.c +++ b/src/cryptenroll/cryptenroll-password.c @@ -78,6 +78,8 @@ int load_volume_key_password( if (r >= 0) break; } + if (r >= 0) + break; log_error_errno(r, "Password not correct, please try again: %m"); ask_password_flags &= ~ASK_PASSWORD_ACCEPT_CACHED;