summaryrefslogtreecommitdiffstats
path: root/servconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-07-26 13:54:56 +0200
committerDamien Miller <djm@mindrot.org>2005-07-26 13:54:56 +0200
commit9786e6e2a034a8273b5d0d3b8cd8caf063bb875a (patch)
tree0322eb7ffcdd5600fb25094e9627cd62291da2e4 /servconf.c
parent - (djm) OpenBSD CVS Sync (diff)
downloadopenssh-9786e6e2a034a8273b5d0d3b8cd8caf063bb875a.tar.xz
openssh-9786e6e2a034a8273b5d0d3b8cd8caf063bb875a.zip
- 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 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.142 2005/06/17 02:44:33 djm Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.143 2005/07/25 11:59:40 markus Exp $");
#include "ssh.h"
#include "log.h"
@@ -201,7 +201,7 @@ fill_default_server_options(ServerOptions *options)
if (options->use_login == -1)
options->use_login = 0;
if (options->compression == -1)
- options->compression = 1;
+ options->compression = COMP_DELAYED;
if (options->allow_tcp_forwarding == -1)
options->allow_tcp_forwarding = 1;
if (options->gateway_ports == -1)
@@ -725,7 +725,23 @@ parse_flag:
case sCompression:
intptr = &options->compression;
- goto parse_flag;
+ arg = strdelim(&cp);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing yes/no/delayed "
+ "argument.", filename, linenum);
+ value = 0; /* silence compiler */
+ if (strcmp(arg, "delayed") == 0)
+ value = COMP_DELAYED;
+ else if (strcmp(arg, "yes") == 0)
+ value = COMP_ZLIB;
+ else if (strcmp(arg, "no") == 0)
+ value = COMP_NONE;
+ else
+ fatal("%s line %d: Bad yes/no/delayed "
+ "argument: %s", filename, linenum, arg);
+ if (*intptr == -1)
+ *intptr = value;
+ break;
case sGatewayPorts:
intptr = &options->gateway_ports;