dropbear: server support option '-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 <kevin@darbyshire-bryant.me.uk>
This commit is contained in:
Kevin Darbyshire-Bryant
2017-06-25 21:40:43 +01:00
committed by Stijn Tintel
parent 37c1513b1f
commit 9aaf3d3501
2 changed files with 132 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -488,6 +488,7 @@ void load_all_hostkeys() {
@@ -505,6 +505,7 @@ void load_all_hostkeys() {
m_free(hostkey_file);
}
@@ -8,7 +8,7 @@
#ifdef DROPBEAR_RSA
loadhostkey(RSA_PRIV_FILENAME, 0);
#endif
@@ -499,6 +500,7 @@ void load_all_hostkeys() {
@@ -516,6 +517,7 @@ void load_all_hostkeys() {
#ifdef DROPBEAR_ECDSA
loadhostkey(ECDSA_PRIV_FILENAME, 0);
#endif