Fixed behavior and updated manpage

pull/190/head
Jonas Röger 2018-06-18 21:12:25 +02:00
parent ff7ae95012
commit 0c4b74b297
2 changed files with 14 additions and 3 deletions

View File

@ -105,6 +105,16 @@ your computer with the enter key.
.B \-f, \-\-show-failed-attempts
Show the number of failed attempts, if any.
.TP
.BI \-x\ command \fR,\ \fB\-\-max\-failed\-attempts\-exec= command
Run a command, when the the maximum ammount of failed authentication
attempts (default 3; can be specified with \-m) is exceeded.
.TP
.BI \-m\ count \fR,\ \fB\-\-max\-failed\-attempts= count
Set the maximum ammount of failed authentication attempts.
Without \-x it will be useless.
.TP
.B \-\-debug
Enables debug logging.

View File

@ -82,9 +82,9 @@ extern auth_state_t auth_state;
int failed_attempts = 0;
bool show_failed_attempts = false;
bool retry_verification = false;
int max_failed_attempts = 3;
bool max_failed_attempts_enabled = false;
char *max_failed_attempts_exec;
static int max_failed_attempts = 3;
static bool max_failed_attempts_enabled = false;
static char *max_failed_attempts_exec;
static struct xkb_state *xkb_state;
static struct xkb_context *xkb_context;
@ -376,6 +376,7 @@ static void input_done(void) {
system(max_failed_attempts_exec);
exit(EXIT_SUCCESS);
}
max_failed_attempts_enabled = false;
}
}