summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-07-26 21:54:56 +1000
committerDamien Miller <djm@mindrot.org>2005-07-26 21:54:56 +1000
commit9786e6e2a034a8273b5d0d3b8cd8caf063bb875a (patch)
tree0322eb7ffcdd5600fb25094e9627cd62291da2e4 /servconf.c
parent47655ee03a67ed89ef55c957e5a8183ca3113d2c (diff)
- markus@cvs.openbsd.org 2005/07/25 11:59:40
[kex.c kex.h myproposal.h packet.c packet.h servconf.c session.c] [sshconnect2.c sshd.c sshd_config sshd_config.5] add a new compression method that delays compression until the user has been authenticated successfully and set compression to 'delayed' for sshd. this breaks older openssh clients (< 3.5) if they insist on compression, so you have to re-enable compression in sshd_config. ok djm@
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;