summaryrefslogtreecommitdiffhomepage
path: root/svr-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-06-27 22:20:38 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-06-27 22:20:38 +0800
commit74ace058a634d3761725ba7f326ba89142029c39 (patch)
treebf747233b54274e9a21eb89e1c5edce198e65297 /svr-runopts.c
parent96382d52ab5edc107adaf4464127f5e9974e40eb (diff)
Use MAX_AUTH_TRIES rather than DEFAULT_AUTH_TRIES, don't limit argument range
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/svr-runopts.c b/svr-runopts.c
index 1966f26..cca5562 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -73,7 +73,7 @@ static void printhelp(const char * progname) {
"-g Disable password logins for root\n"
"-B Allow blank password logins\n"
#endif
- "-T <1 to %d> Maximum authentication tries (default %d)\n"
+ "-T Maximum authentication tries (default %d)\n"
#if DROPBEAR_SVR_LOCALTCPFWD
"-j Disable local port forwarding\n"
#endif
@@ -108,7 +108,7 @@ static void printhelp(const char * progname) {
#if DROPBEAR_ECDSA
ECDSA_PRIV_FILENAME,
#endif
- MAX_AUTH_TRIES, DEFAULT_AUTH_TRIES,
+ MAX_AUTH_TRIES,
DROPBEAR_MAX_PORTS, DROPBEAR_DEFPORT, DROPBEAR_PIDFILE,
DEFAULT_RECV_WINDOW, DEFAULT_KEEPALIVE, DEFAULT_IDLE_TIMEOUT);
}
@@ -135,7 +135,7 @@ void svr_getopts(int argc, char ** argv) {
svr_opts.noauthpass = 0;
svr_opts.norootpass = 0;
svr_opts.allowblankpass = 0;
- svr_opts.maxauthtries = DEFAULT_AUTH_TRIES;
+ svr_opts.maxauthtries = MAX_AUTH_TRIES;
svr_opts.inetdmode = 0;
svr_opts.portcount = 0;
svr_opts.hostkey = NULL;
@@ -341,8 +341,8 @@ void svr_getopts(int argc, char ** argv) {
if (maxauthtries_arg) {
unsigned int val = 0;
- if (m_str_to_uint(maxauthtries_arg, &val) == DROPBEAR_FAILURE ||
- val == 0 || val > MAX_AUTH_TRIES) {
+ if (m_str_to_uint(maxauthtries_arg, &val) == DROPBEAR_FAILURE
+ || val == 0) {
dropbear_exit("Bad maxauthtries '%s'", maxauthtries_arg);
}
svr_opts.maxauthtries = val;