]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "cryptenroll: drop unmet condition"
authorDan Streetman <ddstreet@ieee.org>
Fri, 21 Jul 2023 14:45:16 +0000 (10:45 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 21 Jul 2023 17:59:26 +0000 (18:59 +0100)
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
src/cryptenroll/cryptenroll-password.c

index 499dbbc627a775c4d12f636c87e5031736bc5ec9..9deb98f202f214c1a8d56d2c9c68e907fe8bad9f 100644 (file)
@@ -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;