Skip to content

Commit

Permalink
- [email protected] 2002/06/20 23:05:56
Browse files Browse the repository at this point in the history
     [servconf.c servconf.h session.c sshd.c]
     allow Compression=yes/no in sshd_config
  • Loading branch information
mouring committed Jun 21, 2002
1 parent 9721e92 commit 23e0f66
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
- [email protected] 2002/06/20 20:03:34
[ssh_config sshd_config]
refer to config file man page
- [email protected] 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
[email protected]

Expand Down Expand Up @@ -975,4 +978,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@

$Id: ChangeLog,v 1.2229 2002/06/21 01:06:03 mouring Exp $
$Id: ChangeLog,v 1.2230 2002/06/21 01:09:47 mouring Exp $
12 changes: 10 additions & 2 deletions servconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -342,6 +345,7 @@ static struct {
{ "strictmodes", sStrictModes },
{ "permitemptypasswords", sEmptyPasswd },
{ "uselogin", sUseLogin },
{ "compression", sCompression },
{ "keepalive", sKeepAlives },
{ "allowtcpforwarding", sAllowTcpForwarding },
{ "allowusers", sAllowUsers },
Expand Down Expand Up @@ -704,6 +708,10 @@ process_server_config_line(ServerOptions *options, char *line,
intptr = &options->use_login;
goto parse_flag;

case sCompression:
intptr = &options->compression;
goto parse_flag;

case sGatewayPorts:
intptr = &options->gateway_ports;
goto parse_flag;
Expand Down
3 changes: 2 additions & 1 deletion servconf.h
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Expand Down Expand Up @@ -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];
Expand Down
6 changes: 5 additions & 1 deletion session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion sshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 23e0f66

Please sign in to comment.