From 790f6d4401f1cd98208576fb60eda8c5cd2b4b1f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 5 Apr 2010 10:14:47 -0400 Subject: [PATCH] [client] Allow unlimited unlock attempts The ask-for-password command has an option to specify the maximum number of retries to get the correct password. The default number of retries was 3. This makes sense for /opt, and to a lesser degree /home, but it doesn't make sense at all for /, since failing means the system won't boot. The new default is "unlimited". This fixes the / case, but has the downside that all integration code that was depending on the 3 default before will need to get updated. --- src/client/plymouth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/plymouth.c b/src/client/plymouth.c index f36a48a3..c219cf6c 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -499,7 +500,7 @@ on_password_request (state_t *state, NULL); if (number_of_tries <= 0) - number_of_tries = 3; + number_of_tries = INT_MAX; password_answer_state = calloc (1, sizeof (password_answer_state_t)); password_answer_state->state = state;