summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index 40da37513..92aa9bbd2 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.311 2005/06/17 02:44:33 djm Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.312 2005/07/25 11:59:40 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -671,6 +671,12 @@ privsep_postauth(Authctxt *authctxt)
671 671
672 /* It is safe now to apply the key state */ 672 /* It is safe now to apply the key state */
673 monitor_apply_keystate(pmonitor); 673 monitor_apply_keystate(pmonitor);
674
675 /*
676 * Tell the packet layer that authentication was successful, since
677 * this information is not part of the key state.
678 */
679 packet_set_authenticated();
674} 680}
675 681
676static char * 682static char *
@@ -1621,6 +1627,7 @@ main(int ac, char **av)
1621 * not have a key. 1627 * not have a key.
1622 */ 1628 */
1623 packet_set_connection(sock_in, sock_out); 1629 packet_set_connection(sock_in, sock_out);
1630 packet_set_server();
1624 1631
1625 /* Set SO_KEEPALIVE if requested. */ 1632 /* Set SO_KEEPALIVE if requested. */
1626 if (options.tcp_keep_alive && packet_connection_is_on_socket() && 1633 if (options.tcp_keep_alive && packet_connection_is_on_socket() &&
@@ -1988,10 +1995,14 @@ do_ssh2_kex(void)
1988 myproposal[PROPOSAL_MAC_ALGS_CTOS] = 1995 myproposal[PROPOSAL_MAC_ALGS_CTOS] =
1989 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; 1996 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
1990 } 1997 }
1991 if (!options.compression) { 1998 if (options.compression == COMP_NONE) {
1992 myproposal[PROPOSAL_COMP_ALGS_CTOS] = 1999 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
1993 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none"; 2000 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
2001 } else if (options.compression == COMP_DELAYED) {
2002 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
2003 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com";
1994 } 2004 }
2005
1995 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); 2006 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
1996 2007
1997 /* start key exchange */ 2008 /* start key exchange */