diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | monitor.c | 21 |
2 files changed, 22 insertions, 9 deletions
@@ -1,3 +1,11 @@ | |||
1 | 20020621 | ||
2 | - (djm) Sync: | ||
3 | - djm@cvs.openbsd.org 2002/06/21 05:50:51 | ||
4 | [monitor.c] | ||
5 | Don't initialise compression buffers when compression=no in sshd_config; | ||
6 | ok Niels@ | ||
7 | |||
8 | |||
1 | 20020620 | 9 | 20020620 |
2 | - (bal) Fixed AIX environment handling, use setpcred() instead of existing | 10 | - (bal) Fixed AIX environment handling, use setpcred() instead of existing |
3 | code. (Bugzilla Bug 261) | 11 | code. (Bugzilla Bug 261) |
@@ -986,4 +994,4 @@ | |||
986 | - (stevesk) entropy.c: typo in debug message | 994 | - (stevesk) entropy.c: typo in debug message |
987 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 995 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
988 | 996 | ||
989 | $Id: ChangeLog,v 1.2234 2002/06/21 01:38:53 mouring Exp $ | 997 | $Id: ChangeLog,v 1.2235 2002/06/21 05:59:49 djm Exp $ |
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.15 2002/06/19 18:01:00 markus Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.16 2002/06/21 05:50:51 djm Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -327,8 +327,10 @@ monitor_child_postauth(struct monitor *pmonitor) | |||
327 | void | 327 | void |
328 | monitor_sync(struct monitor *pmonitor) | 328 | monitor_sync(struct monitor *pmonitor) |
329 | { | 329 | { |
330 | /* The member allocation is not visible, so sync it */ | 330 | if (options.compression) { |
331 | mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback); | 331 | /* The member allocation is not visible, so sync it */ |
332 | mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback); | ||
333 | } | ||
332 | } | 334 | } |
333 | 335 | ||
334 | int | 336 | int |
@@ -1330,7 +1332,8 @@ monitor_apply_keystate(struct monitor *pmonitor) | |||
1330 | sizeof(outgoing_stream)); | 1332 | sizeof(outgoing_stream)); |
1331 | 1333 | ||
1332 | /* Update with new address */ | 1334 | /* Update with new address */ |
1333 | mm_init_compression(pmonitor->m_zlib); | 1335 | if (options.compression) |
1336 | mm_init_compression(pmonitor->m_zlib); | ||
1334 | 1337 | ||
1335 | /* Network I/O buffers */ | 1338 | /* Network I/O buffers */ |
1336 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ | 1339 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ |
@@ -1515,11 +1518,13 @@ monitor_init(void) | |||
1515 | mon->m_sendfd = pair[1]; | 1518 | mon->m_sendfd = pair[1]; |
1516 | 1519 | ||
1517 | /* Used to share zlib space across processes */ | 1520 | /* Used to share zlib space across processes */ |
1518 | mon->m_zback = mm_create(NULL, MM_MEMSIZE); | 1521 | if (options.compression) { |
1519 | mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE); | 1522 | mon->m_zback = mm_create(NULL, MM_MEMSIZE); |
1523 | mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE); | ||
1520 | 1524 | ||
1521 | /* Compression needs to share state across borders */ | 1525 | /* Compression needs to share state across borders */ |
1522 | mm_init_compression(mon->m_zlib); | 1526 | mm_init_compression(mon->m_zlib); |
1527 | } | ||
1523 | 1528 | ||
1524 | return mon; | 1529 | return mon; |
1525 | } | 1530 | } |