]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[client] Allow unlimited unlock attempts
authorRay Strode <rstrode@redhat.com>
Mon, 5 Apr 2010 14:14:47 +0000 (10:14 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 5 Apr 2010 14:14:47 +0000 (10:14 -0400)
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

index f36a48a3653efa83bec8b4581c7fff221e5ca25f..c219cf6ccf32dc8770dc4bf011ad145df9e859d8 100644 (file)
@@ -24,6 +24,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -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;