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.
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
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;