mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
1083bcdc4f
this release is mostly the support for lots of ssh2. Note that SSH2 is not fully supported here yet, but it's mostly there; see README.openssh2.
64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
--- servconf.c.orig Thu Apr 20 17:55:11 2000
|
|
+++ servconf.c Thu Apr 20 18:00:08 2000
|
|
@@ -71,6 +71,8 @@
|
|
options->num_deny_groups = 0;
|
|
options->ciphers = NULL;
|
|
options->protocol = SSH_PROTO_UNKNOWN;
|
|
+ options->connections_per_period = 0;
|
|
+ options->connections_period = 0;
|
|
}
|
|
|
|
void
|
|
@@ -163,7 +165,7 @@
|
|
#ifdef SKEY
|
|
sSkeyAuthentication,
|
|
#endif
|
|
- sPasswordAuthentication, sListenAddress,
|
|
+ sPasswordAuthentication, sListenAddress, sConnectionsPerPeriod,
|
|
sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset,
|
|
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail,
|
|
sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
|
|
@@ -218,6 +220,7 @@
|
|
{ "denygroups", sDenyGroups },
|
|
{ "ciphers", sCiphers },
|
|
{ "protocol", sProtocol },
|
|
+ { "connectionsperperiod", sConnectionsPerPeriod },
|
|
{ NULL, 0 }
|
|
};
|
|
|
|
@@ -327,7 +330,11 @@
|
|
filename, linenum);
|
|
exit(1);
|
|
}
|
|
- value = atoi(cp);
|
|
+ if (sscanf(cp, " %d ", &value) != 1) {
|
|
+ fprintf(stderr, "%s line %d: invalid integer value.\n",
|
|
+ filename, linenum);
|
|
+ exit(1);
|
|
+ }
|
|
if (*intptr == -1)
|
|
*intptr = value;
|
|
break;
|
|
@@ -551,6 +558,21 @@
|
|
filename, linenum);
|
|
options->deny_groups[options->num_deny_groups++] = xstrdup(cp);
|
|
}
|
|
+ break;
|
|
+
|
|
+ case sConnectionsPerPeriod:
|
|
+ cp = strtok(NULL, WHITESPACE);
|
|
+ if (cp == NULL)
|
|
+ fatal("%.200s line %d: missing (>= 0) number argument.\n",
|
|
+ filename, linenum);
|
|
+ if (sscanf(cp, " %u/%u ", &options->connections_per_period,
|
|
+ &options->connections_period) != 2)
|
|
+ fatal("%.200s line %d: invalid numerical argument(s).\n",
|
|
+ filename, linenum);
|
|
+ if (options->connections_per_period != 0 &&
|
|
+ options->connections_period == 0)
|
|
+ fatal("%.200s line %d: invalid connections period.\n",
|
|
+ filename, linenum);
|
|
break;
|
|
|
|
case sCiphers:
|