summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/servconf.c b/servconf.c
index deec167be..7ef7b234e 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.142 2005/06/17 02:44:33 djm Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.143 2005/07/25 11:59:40 markus Exp $");
14 14
15#include "ssh.h" 15#include "ssh.h"
16#include "log.h" 16#include "log.h"
@@ -201,7 +201,7 @@ fill_default_server_options(ServerOptions *options)
201 if (options->use_login == -1) 201 if (options->use_login == -1)
202 options->use_login = 0; 202 options->use_login = 0;
203 if (options->compression == -1) 203 if (options->compression == -1)
204 options->compression = 1; 204 options->compression = COMP_DELAYED;
205 if (options->allow_tcp_forwarding == -1) 205 if (options->allow_tcp_forwarding == -1)
206 options->allow_tcp_forwarding = 1; 206 options->allow_tcp_forwarding = 1;
207 if (options->gateway_ports == -1) 207 if (options->gateway_ports == -1)
@@ -725,7 +725,23 @@ parse_flag:
725 725
726 case sCompression: 726 case sCompression:
727 intptr = &options->compression; 727 intptr = &options->compression;
728 goto parse_flag; 728 arg = strdelim(&cp);
729 if (!arg || *arg == '\0')
730 fatal("%s line %d: missing yes/no/delayed "
731 "argument.", filename, linenum);
732 value = 0; /* silence compiler */
733 if (strcmp(arg, "delayed") == 0)
734 value = COMP_DELAYED;
735 else if (strcmp(arg, "yes") == 0)
736 value = COMP_ZLIB;
737 else if (strcmp(arg, "no") == 0)
738 value = COMP_NONE;
739 else
740 fatal("%s line %d: Bad yes/no/delayed "
741 "argument: %s", filename, linenum, arg);
742 if (*intptr == -1)
743 *intptr = value;
744 break;
729 745
730 case sGatewayPorts: 746 case sGatewayPorts:
731 intptr = &options->gateway_ports; 747 intptr = &options->gateway_ports;