summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-05-24 10:36:23 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-05-24 10:36:23 +1000
commit89413dbafa5a5f237ba1040b74e6437b8b1ff1e0 (patch)
tree0436722462ae48880fa96b00d31f45caa6bf4ea5 /servconf.c
parente534e1212703c04906d3ab00ba768f3a45bd2370 (diff)
- dtucker@cvs.openbsd.org 2004/05/23 23:59:53
[auth.c auth.h auth1.c auth2.c servconf.c servconf.h sshd_config sshd_config.5] Add MaxAuthTries sshd config option; ok markus@
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c
index 467ad64e8..ef8651651 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.132 2004/05/08 00:01:37 deraadt Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.133 2004/05/23 23:59:53 dtucker Exp $");
14 14
15#include "ssh.h" 15#include "ssh.h"
16#include "log.h" 16#include "log.h"
@@ -94,6 +94,7 @@ initialize_server_options(ServerOptions *options)
94 options->max_startups_begin = -1; 94 options->max_startups_begin = -1;
95 options->max_startups_rate = -1; 95 options->max_startups_rate = -1;
96 options->max_startups = -1; 96 options->max_startups = -1;
97 options->max_authtries = -1;
97 options->banner = NULL; 98 options->banner = NULL;
98 options->use_dns = -1; 99 options->use_dns = -1;
99 options->client_alive_interval = -1; 100 options->client_alive_interval = -1;
@@ -212,6 +213,8 @@ fill_default_server_options(ServerOptions *options)
212 options->max_startups_rate = 100; /* 100% */ 213 options->max_startups_rate = 100; /* 100% */
213 if (options->max_startups_begin == -1) 214 if (options->max_startups_begin == -1)
214 options->max_startups_begin = options->max_startups; 215 options->max_startups_begin = options->max_startups;
216 if (options->max_authtries == -1)
217 options->max_authtries = DEFAULT_AUTH_FAIL_MAX;
215 if (options->use_dns == -1) 218 if (options->use_dns == -1)
216 options->use_dns = 1; 219 options->use_dns = 1;
217 if (options->client_alive_interval == -1) 220 if (options->client_alive_interval == -1)
@@ -262,7 +265,8 @@ typedef enum {
262 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, 265 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
263 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 266 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
264 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 267 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
265 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, 268 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem,
269 sMaxStartups, sMaxAuthTries,
266 sBanner, sUseDNS, sHostbasedAuthentication, 270 sBanner, sUseDNS, sHostbasedAuthentication,
267 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 271 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
268 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 272 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
@@ -357,6 +361,7 @@ static struct {
357 { "gatewayports", sGatewayPorts }, 361 { "gatewayports", sGatewayPorts },
358 { "subsystem", sSubsystem }, 362 { "subsystem", sSubsystem },
359 { "maxstartups", sMaxStartups }, 363 { "maxstartups", sMaxStartups },
364 { "maxauthtries", sMaxAuthTries },
360 { "banner", sBanner }, 365 { "banner", sBanner },
361 { "usedns", sUseDNS }, 366 { "usedns", sUseDNS },
362 { "verifyreversemapping", sDeprecated }, 367 { "verifyreversemapping", sDeprecated },
@@ -869,6 +874,10 @@ parse_flag:
869 options->max_startups = options->max_startups_begin; 874 options->max_startups = options->max_startups_begin;
870 break; 875 break;
871 876
877 case sMaxAuthTries:
878 intptr = &options->max_authtries;
879 goto parse_int;
880
872 case sBanner: 881 case sBanner:
873 charptr = &options->banner; 882 charptr = &options->banner;
874 goto parse_filename; 883 goto parse_filename;