]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/06/20 23:05:56
authormouring <mouring>
Fri, 21 Jun 2002 01:09:47 +0000 (01:09 +0000)
committermouring <mouring>
Fri, 21 Jun 2002 01:09:47 +0000 (01:09 +0000)
     [servconf.c servconf.h session.c sshd.c]
     allow Compression=yes/no in sshd_config

ChangeLog
servconf.c
servconf.h
session.c
sshd.c

index 0721b9c7f3deedcf0667bd9e3d0c06b20300cbe5..21737301cf14ecff5a8669c9db257f100b29a78b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,9 @@
    - stevesk@cvs.openbsd.org 2002/06/20 20:03:34
      [ssh_config sshd_config]
      refer to config file man page
+   - markus@cvs.openbsd.org 2002/06/20 23:05:56
+     [servconf.c servconf.h session.c sshd.c]
+     allow Compression=yes/no in sshd_config
  - (bal) Cygwin special handling of empty passwords wrong.  Patch by
    vinschen@redhat.com
 
index 7a776ac8e8a797a7a5134a72e62eaac42dfa6833..b7f941ab5aed9801fa4d561efe45b8160d00a0e0 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.110 2002/05/15 21:56:38 markus Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.111 2002/06/20 23:05:55 markus Exp $");
 
 #if defined(KRB4)
 #include <krb.h>
@@ -102,6 +102,7 @@ initialize_server_options(ServerOptions *options)
        options->challenge_response_authentication = -1;
        options->permit_empty_passwd = -1;
        options->use_login = -1;
+       options->compression = -1;
        options->allow_tcp_forwarding = -1;
        options->num_allow_users = 0;
        options->num_deny_users = 0;
@@ -224,6 +225,8 @@ fill_default_server_options(ServerOptions *options)
                options->permit_empty_passwd = 0;
        if (options->use_login == -1)
                options->use_login = 0;
+       if (options->compression == -1)
+               options->compression = 1;
        if (options->allow_tcp_forwarding == -1)
                options->allow_tcp_forwarding = 1;
        if (options->gateway_ports == -1)
@@ -278,7 +281,7 @@ typedef enum {
        sPrintMotd, sPrintLastLog, sIgnoreRhosts,
        sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
        sStrictModes, sEmptyPasswd, sKeepAlives,
-       sUseLogin, sAllowTcpForwarding,
+       sUseLogin, sAllowTcpForwarding, sCompression,
        sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
        sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
        sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups,
@@ -342,6 +345,7 @@ static struct {
        { "strictmodes", sStrictModes },
        { "permitemptypasswords", sEmptyPasswd },
        { "uselogin", sUseLogin },
+       { "compression", sCompression },
        { "keepalive", sKeepAlives },
        { "allowtcpforwarding", sAllowTcpForwarding },
        { "allowusers", sAllowUsers },
@@ -704,6 +708,10 @@ parse_flag:
                intptr = &options->use_login;
                goto parse_flag;
 
+       case sCompression:
+               intptr = &options->compression;
+               goto parse_flag;
+
        case sGatewayPorts:
                intptr = &options->gateway_ports;
                goto parse_flag;
index c4e5b5f42bf388e51103f9248d3ac808a00ded0a..c94f541d0ccfe46fb00f2c28be1813e5c98a2aa4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: servconf.h,v 1.57 2002/03/20 19:12:25 stevesk Exp $   */
+/*     $OpenBSD: servconf.h,v 1.58 2002/06/20 23:05:55 markus Exp $    */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -98,6 +98,7 @@ typedef struct {
        int     permit_empty_passwd;    /* If false, do not permit empty
                                         * passwords. */
        int     use_login;      /* If true, login(1) is used */
+       int     compression;    /* If true, compression is allowed */
        int     allow_tcp_forwarding;
        u_int num_allow_users;
        char   *allow_users[MAX_ALLOW_USERS];
index f6f9c54480d1017baef9fa5a6f7eff76c17969e1..6169f33073701c1dc14956b9967c5d79c7d711db 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.137 2002/06/11 05:46:20 mpech Exp $");
+RCSID("$OpenBSD: session.c,v 1.138 2002/06/20 23:05:55 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -279,6 +279,10 @@ do_authenticated1(Authctxt *authctxt)
                                    compression_level);
                                break;
                        }
+                       if (!options.compression) {
+                               debug2("compression disabled");
+                               break;
+                       }
                        /* Enable compression after we have responded with SUCCESS. */
                        enable_compression_after_reply = 1;
                        success = 1;
diff --git a/sshd.c b/sshd.c
index 9ac43a882a1a127daaa0cabec1bc00971b0e871e..feea3ce2c5ca3aedafa5385e2fa201f6390240a0 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.245 2002/06/11 05:46:20 mpech Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.246 2002/06/20 23:05:56 markus Exp $");
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
@@ -1765,6 +1765,10 @@ do_ssh2_kex(void)
                myproposal[PROPOSAL_MAC_ALGS_CTOS] =
                myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
        }
+       if (!options.compression) {
+               myproposal[PROPOSAL_COMP_ALGS_CTOS] =
+               myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
+       }
        myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
 
        /* start key exchange */
This page took 0.056821 seconds and 5 git commands to generate.