summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--monitor.c4
-rw-r--r--packet.c22
-rw-r--r--packet.h3
4 files changed, 32 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 486ed9c5c..0969811ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,12 @@
76 [misc.h poly1305.h ssh-pkcs11.c defines.h] 76 [misc.h poly1305.h ssh-pkcs11.c defines.h]
77 revert __bounded change; it causes way more problems for portable than 77 revert __bounded change; it causes way more problems for portable than
78 it solves; pointed out by dtucker@ 78 it solves; pointed out by dtucker@
79 - markus@cvs.openbsd.org 2014/05/03 17:20:34
80 [monitor.c packet.c packet.h]
81 unbreak compression, by re-init-ing the compression code in the
82 post-auth child. the new buffer code is more strict, and requires
83 buffer_init() while the old code was happy after a bzero();
84 originally from djm@
79 85
8020140430 8620140430
81 - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already 87 - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
diff --git a/monitor.c b/monitor.c
index a38647d49..9391ae8d1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.132 2014/04/29 18:01:49 markus Exp $ */ 1/* $OpenBSD: monitor.c,v 1.133 2014/05/03 17:20:34 markus Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1811,6 +1811,8 @@ monitor_apply_keystate(struct monitor *pmonitor)
1811 if (options.compression) 1811 if (options.compression)
1812 mm_init_compression(pmonitor->m_zlib); 1812 mm_init_compression(pmonitor->m_zlib);
1813 1813
1814 packet_set_postauth();
1815
1814 if (options.rekey_limit || options.rekey_interval) 1816 if (options.rekey_limit || options.rekey_interval)
1815 packet_set_rekey_limits((u_int32_t)options.rekey_limit, 1817 packet_set_rekey_limits((u_int32_t)options.rekey_limit,
1816 (time_t)options.rekey_interval); 1818 (time_t)options.rekey_interval);
diff --git a/packet.c b/packet.c
index c7c18f308..3dd66d7d9 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.195 2014/04/29 18:01:49 markus Exp $ */ 1/* $OpenBSD: packet.c,v 1.196 2014/05/03 17:20:34 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2059,3 +2059,23 @@ packet_restore_state(void)
2059 add_recv_bytes(len); 2059 add_recv_bytes(len);
2060 } 2060 }
2061} 2061}
2062
2063/* Reset after_authentication and reset compression in post-auth privsep */
2064void
2065packet_set_postauth(void)
2066{
2067 Comp *comp;
2068 int mode;
2069
2070 debug("%s: called", __func__);
2071 /* This was set in net child, but is not visible in user child */
2072 active_state->after_authentication = 1;
2073 active_state->rekeying = 0;
2074 for (mode = 0; mode < MODE_MAX; mode++) {
2075 if (active_state->newkeys[mode] == NULL)
2076 continue;
2077 comp = &active_state->newkeys[mode]->comp;
2078 if (comp && comp->enabled)
2079 packet_init_compression();
2080 }
2081}
diff --git a/packet.h b/packet.h
index 1d6082a8a..e7b5fcba9 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.60 2014/04/28 03:09:18 djm Exp $ */ 1/* $OpenBSD: packet.h,v 1.61 2014/05/03 17:20:34 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -120,6 +120,7 @@ time_t packet_get_rekey_timeout(void);
120 120
121void packet_backup_state(void); 121void packet_backup_state(void);
122void packet_restore_state(void); 122void packet_restore_state(void);
123void packet_set_postauth(void);
123 124
124void *packet_get_input(void); 125void *packet_get_input(void);
125void *packet_get_output(void); 126void *packet_get_output(void);