From e2551012993ea913e23012774330da926366487f Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Mon, 29 May 2017 10:25:09 +0100 Subject: dropbear server: support -T max auth tries Add support for '-T n' for a run-time specification for maximum number of authentication attempts where 'n' is between 1 and compile time option MAX_AUTH_TRIES. A default number of tries can be specified at compile time using 'DEFAULT_AUTH_TRIES' which itself defaults to MAX_AUTH_TRIES for backwards compatibility. Signed-off-by: Kevin Darbyshire-Bryant --- svr-auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svr-auth.c') diff --git a/svr-auth.c b/svr-auth.c index 4dc280c..9636e12 100644 --- a/svr-auth.c +++ b/svr-auth.c @@ -362,7 +362,7 @@ void send_msg_userauth_failure(int partial, int incrfail) { ses.authstate.failcount++; } - if (ses.authstate.failcount >= MAX_AUTH_TRIES) { + if (ses.authstate.failcount >= svr_opts.maxauthtries) { char * userstr; /* XXX - send disconnect ? */ TRACE(("Max auth tries reached, exiting")) -- cgit v1.2.3