diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index 59687e16d..43a2c111e 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: servconf.c,v 1.65 2001/02/04 15:32:24 stevesk Exp $"); | 13 | RCSID("$OpenBSD: servconf.c,v 1.66 2001/02/11 12:59:25 markus Exp $"); |
14 | 14 | ||
15 | #ifdef KRB4 | 15 | #ifdef KRB4 |
16 | #include <krb.h> | 16 | #include <krb.h> |
@@ -28,6 +28,8 @@ RCSID("$OpenBSD: servconf.c,v 1.65 2001/02/04 15:32:24 stevesk Exp $"); | |||
28 | #include "tildexpand.h" | 28 | #include "tildexpand.h" |
29 | #include "misc.h" | 29 | #include "misc.h" |
30 | #include "cipher.h" | 30 | #include "cipher.h" |
31 | #include "kex.h" | ||
32 | #include "mac.h" | ||
31 | 33 | ||
32 | /* add listen address */ | 34 | /* add listen address */ |
33 | void add_listen_addr(ServerOptions *options, char *addr); | 35 | void add_listen_addr(ServerOptions *options, char *addr); |
@@ -85,6 +87,7 @@ initialize_server_options(ServerOptions *options) | |||
85 | options->num_allow_groups = 0; | 87 | options->num_allow_groups = 0; |
86 | options->num_deny_groups = 0; | 88 | options->num_deny_groups = 0; |
87 | options->ciphers = NULL; | 89 | options->ciphers = NULL; |
90 | options->macs = NULL; | ||
88 | options->protocol = SSH_PROTO_UNKNOWN; | 91 | options->protocol = SSH_PROTO_UNKNOWN; |
89 | options->gateway_ports = -1; | 92 | options->gateway_ports = -1; |
90 | options->num_subsystems = 0; | 93 | options->num_subsystems = 0; |
@@ -209,7 +212,7 @@ typedef enum { | |||
209 | sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, | 212 | sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
210 | sUseLogin, sAllowTcpForwarding, | 213 | sUseLogin, sAllowTcpForwarding, |
211 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, | 214 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
212 | sIgnoreUserKnownHosts, sCiphers, sProtocol, sPidFile, | 215 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, |
213 | sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, | 216 | sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, |
214 | sBanner, sReverseMappingCheck | 217 | sBanner, sReverseMappingCheck |
215 | } ServerOpCodes; | 218 | } ServerOpCodes; |
@@ -266,6 +269,7 @@ static struct { | |||
266 | { "allowgroups", sAllowGroups }, | 269 | { "allowgroups", sAllowGroups }, |
267 | { "denygroups", sDenyGroups }, | 270 | { "denygroups", sDenyGroups }, |
268 | { "ciphers", sCiphers }, | 271 | { "ciphers", sCiphers }, |
272 | { "macs", sMacs }, | ||
269 | { "protocol", sProtocol }, | 273 | { "protocol", sProtocol }, |
270 | { "gatewayports", sGatewayPorts }, | 274 | { "gatewayports", sGatewayPorts }, |
271 | { "subsystem", sSubsystem }, | 275 | { "subsystem", sSubsystem }, |
@@ -658,6 +662,17 @@ parse_flag: | |||
658 | options->ciphers = xstrdup(arg); | 662 | options->ciphers = xstrdup(arg); |
659 | break; | 663 | break; |
660 | 664 | ||
665 | case sMacs: | ||
666 | arg = strdelim(&cp); | ||
667 | if (!arg || *arg == '\0') | ||
668 | fatal("%s line %d: Missing argument.", filename, linenum); | ||
669 | if (!mac_valid(arg)) | ||
670 | fatal("%s line %d: Bad SSH2 mac spec '%s'.", | ||
671 | filename, linenum, arg ? arg : "<NONE>"); | ||
672 | if (options->macs == NULL) | ||
673 | options->macs = xstrdup(arg); | ||
674 | break; | ||
675 | |||
661 | case sProtocol: | 676 | case sProtocol: |
662 | intptr = &options->protocol; | 677 | intptr = &options->protocol; |
663 | arg = strdelim(&cp); | 678 | arg = strdelim(&cp); |