summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-21 01:09:47 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-21 01:09:47 +0000
commit23e0f667f88fabb38fd22cedf50e81e78fb99e3e (patch)
treecc55e9a9d007a61a2f4cd1469e1b8f786ee38313
parent9721e92ba8ec5e1c1c3926ce94260605b73243b3 (diff)
- 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
-rw-r--r--ChangeLog5
-rw-r--r--servconf.c12
-rw-r--r--servconf.h3
-rw-r--r--session.c6
-rw-r--r--sshd.c6
5 files changed, 26 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ff32573d7..3029fa80f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,9 @@
45 - stevesk@cvs.openbsd.org 2002/06/20 20:03:34 45 - stevesk@cvs.openbsd.org 2002/06/20 20:03:34
46 [ssh_config sshd_config] 46 [ssh_config sshd_config]
47 refer to config file man page 47 refer to config file man page
48 - markus@cvs.openbsd.org 2002/06/20 23:05:56
49 [servconf.c servconf.h session.c sshd.c]
50 allow Compression=yes/no in sshd_config
48 - (bal) Cygwin special handling of empty passwords wrong. Patch by 51 - (bal) Cygwin special handling of empty passwords wrong. Patch by
49 vinschen@redhat.com 52 vinschen@redhat.com
50 53
@@ -975,4 +978,4 @@
975 - (stevesk) entropy.c: typo in debug message 978 - (stevesk) entropy.c: typo in debug message
976 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 979 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
977 980
978$Id: ChangeLog,v 1.2229 2002/06/21 01:06:03 mouring Exp $ 981$Id: ChangeLog,v 1.2230 2002/06/21 01:09:47 mouring Exp $
diff --git a/servconf.c b/servconf.c
index 7a776ac8e..b7f941ab5 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.110 2002/05/15 21:56:38 markus Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.111 2002/06/20 23:05:55 markus Exp $");
14 14
15#if defined(KRB4) 15#if defined(KRB4)
16#include <krb.h> 16#include <krb.h>
@@ -102,6 +102,7 @@ initialize_server_options(ServerOptions *options)
102 options->challenge_response_authentication = -1; 102 options->challenge_response_authentication = -1;
103 options->permit_empty_passwd = -1; 103 options->permit_empty_passwd = -1;
104 options->use_login = -1; 104 options->use_login = -1;
105 options->compression = -1;
105 options->allow_tcp_forwarding = -1; 106 options->allow_tcp_forwarding = -1;
106 options->num_allow_users = 0; 107 options->num_allow_users = 0;
107 options->num_deny_users = 0; 108 options->num_deny_users = 0;
@@ -224,6 +225,8 @@ fill_default_server_options(ServerOptions *options)
224 options->permit_empty_passwd = 0; 225 options->permit_empty_passwd = 0;
225 if (options->use_login == -1) 226 if (options->use_login == -1)
226 options->use_login = 0; 227 options->use_login = 0;
228 if (options->compression == -1)
229 options->compression = 1;
227 if (options->allow_tcp_forwarding == -1) 230 if (options->allow_tcp_forwarding == -1)
228 options->allow_tcp_forwarding = 1; 231 options->allow_tcp_forwarding = 1;
229 if (options->gateway_ports == -1) 232 if (options->gateway_ports == -1)
@@ -278,7 +281,7 @@ typedef enum {
278 sPrintMotd, sPrintLastLog, sIgnoreRhosts, 281 sPrintMotd, sPrintLastLog, sIgnoreRhosts,
279 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, 282 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
280 sStrictModes, sEmptyPasswd, sKeepAlives, 283 sStrictModes, sEmptyPasswd, sKeepAlives,
281 sUseLogin, sAllowTcpForwarding, 284 sUseLogin, sAllowTcpForwarding, sCompression,
282 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 285 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
283 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 286 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
284 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, 287 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups,
@@ -342,6 +345,7 @@ static struct {
342 { "strictmodes", sStrictModes }, 345 { "strictmodes", sStrictModes },
343 { "permitemptypasswords", sEmptyPasswd }, 346 { "permitemptypasswords", sEmptyPasswd },
344 { "uselogin", sUseLogin }, 347 { "uselogin", sUseLogin },
348 { "compression", sCompression },
345 { "keepalive", sKeepAlives }, 349 { "keepalive", sKeepAlives },
346 { "allowtcpforwarding", sAllowTcpForwarding }, 350 { "allowtcpforwarding", sAllowTcpForwarding },
347 { "allowusers", sAllowUsers }, 351 { "allowusers", sAllowUsers },
@@ -704,6 +708,10 @@ parse_flag:
704 intptr = &options->use_login; 708 intptr = &options->use_login;
705 goto parse_flag; 709 goto parse_flag;
706 710
711 case sCompression:
712 intptr = &options->compression;
713 goto parse_flag;
714
707 case sGatewayPorts: 715 case sGatewayPorts:
708 intptr = &options->gateway_ports; 716 intptr = &options->gateway_ports;
709 goto parse_flag; 717 goto parse_flag;
diff --git a/servconf.h b/servconf.h
index c4e5b5f42..c94f541d0 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.57 2002/03/20 19:12:25 stevesk Exp $ */ 1/* $OpenBSD: servconf.h,v 1.58 2002/06/20 23:05:55 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -98,6 +98,7 @@ typedef struct {
98 int permit_empty_passwd; /* If false, do not permit empty 98 int permit_empty_passwd; /* If false, do not permit empty
99 * passwords. */ 99 * passwords. */
100 int use_login; /* If true, login(1) is used */ 100 int use_login; /* If true, login(1) is used */
101 int compression; /* If true, compression is allowed */
101 int allow_tcp_forwarding; 102 int allow_tcp_forwarding;
102 u_int num_allow_users; 103 u_int num_allow_users;
103 char *allow_users[MAX_ALLOW_USERS]; 104 char *allow_users[MAX_ALLOW_USERS];
diff --git a/session.c b/session.c
index f6f9c5448..6169f3307 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.137 2002/06/11 05:46:20 mpech Exp $"); 36RCSID("$OpenBSD: session.c,v 1.138 2002/06/20 23:05:55 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -279,6 +279,10 @@ do_authenticated1(Authctxt *authctxt)
279 compression_level); 279 compression_level);
280 break; 280 break;
281 } 281 }
282 if (!options.compression) {
283 debug2("compression disabled");
284 break;
285 }
282 /* Enable compression after we have responded with SUCCESS. */ 286 /* Enable compression after we have responded with SUCCESS. */
283 enable_compression_after_reply = 1; 287 enable_compression_after_reply = 1;
284 success = 1; 288 success = 1;
diff --git a/sshd.c b/sshd.c
index 9ac43a882..feea3ce2c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.245 2002/06/11 05:46:20 mpech Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.246 2002/06/20 23:05:56 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1765,6 +1765,10 @@ do_ssh2_kex(void)
1765 myproposal[PROPOSAL_MAC_ALGS_CTOS] = 1765 myproposal[PROPOSAL_MAC_ALGS_CTOS] =
1766 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; 1766 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
1767 } 1767 }
1768 if (!options.compression) {
1769 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
1770 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
1771 }
1768 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); 1772 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
1769 1773
1770 /* start key exchange */ 1774 /* start key exchange */