[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.
This commit is contained in:
Ray Strode 2010-04-05 10:14:47 -04:00
parent 417beaca9b
commit 790f6d4401

View 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;