diff options
author | Colin Watson <cjwatson@debian.org> | 2010-01-24 22:46:54 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-01-24 22:46:54 +0000 |
commit | 59247ecde39f2d826a94ab07f6095ca1f6644e88 (patch) | |
tree | 5910d4a840352aafbf67e8a39fa63936e5529b26 /monitor.c | |
parent | 07d905b406c4ab64ea2f10a22f4f8f0d595269f6 (diff) | |
parent | 964476f91b66c475d5b8fa1e8b28d39a97a1b56e (diff) |
* New upstream release.
* Update to GSSAPI patch from
http://www.sxw.org.uk/computing/patches/openssh-5.3p1-gsskex-all-20100124.patch.
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 25 |
1 files changed, 19 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.101 2009/02/12 03:26:22 djm Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.104 2009/06/12 20:43:22 andreas 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> |
@@ -88,6 +88,7 @@ | |||
88 | #include "compat.h" | 88 | #include "compat.h" |
89 | #include "ssh2.h" | 89 | #include "ssh2.h" |
90 | #include "jpake.h" | 90 | #include "jpake.h" |
91 | #include "roaming.h" | ||
91 | 92 | ||
92 | #ifdef GSSAPI | 93 | #ifdef GSSAPI |
93 | static Gssctxt *gsscontext = NULL; | 94 | static Gssctxt *gsscontext = NULL; |
@@ -100,7 +101,6 @@ extern Newkeys *current_keys[]; | |||
100 | extern z_stream incoming_stream; | 101 | extern z_stream incoming_stream; |
101 | extern z_stream outgoing_stream; | 102 | extern z_stream outgoing_stream; |
102 | extern u_char session_id[]; | 103 | extern u_char session_id[]; |
103 | extern Buffer input, output; | ||
104 | extern Buffer auth_debug; | 104 | extern Buffer auth_debug; |
105 | extern int auth_debug_init; | 105 | extern int auth_debug_init; |
106 | extern Buffer loginmsg; | 106 | extern Buffer loginmsg; |
@@ -126,6 +126,8 @@ struct { | |||
126 | u_int ilen; | 126 | u_int ilen; |
127 | u_char *output; | 127 | u_char *output; |
128 | u_int olen; | 128 | u_int olen; |
129 | u_int64_t sent_bytes; | ||
130 | u_int64_t recv_bytes; | ||
129 | } child_state; | 131 | } child_state; |
130 | 132 | ||
131 | /* Functions on the monitor that answer unprivileged requests */ | 133 | /* Functions on the monitor that answer unprivileged requests */ |
@@ -1713,15 +1715,20 @@ monitor_apply_keystate(struct monitor *pmonitor) | |||
1713 | 1715 | ||
1714 | /* Network I/O buffers */ | 1716 | /* Network I/O buffers */ |
1715 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ | 1717 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ |
1716 | buffer_clear(&input); | 1718 | buffer_clear(packet_get_input()); |
1717 | buffer_append(&input, child_state.input, child_state.ilen); | 1719 | buffer_append(packet_get_input(), child_state.input, child_state.ilen); |
1718 | memset(child_state.input, 0, child_state.ilen); | 1720 | memset(child_state.input, 0, child_state.ilen); |
1719 | xfree(child_state.input); | 1721 | xfree(child_state.input); |
1720 | 1722 | ||
1721 | buffer_clear(&output); | 1723 | buffer_clear(packet_get_output()); |
1722 | buffer_append(&output, child_state.output, child_state.olen); | 1724 | buffer_append(packet_get_output(), child_state.output, |
1725 | child_state.olen); | ||
1723 | memset(child_state.output, 0, child_state.olen); | 1726 | memset(child_state.output, 0, child_state.olen); |
1724 | xfree(child_state.output); | 1727 | xfree(child_state.output); |
1728 | |||
1729 | /* Roaming */ | ||
1730 | if (compat20) | ||
1731 | roam_set_bytes(child_state.sent_bytes, child_state.recv_bytes); | ||
1725 | } | 1732 | } |
1726 | 1733 | ||
1727 | static Kex * | 1734 | static Kex * |
@@ -1844,6 +1851,12 @@ mm_get_keystate(struct monitor *pmonitor) | |||
1844 | child_state.input = buffer_get_string(&m, &child_state.ilen); | 1851 | child_state.input = buffer_get_string(&m, &child_state.ilen); |
1845 | child_state.output = buffer_get_string(&m, &child_state.olen); | 1852 | child_state.output = buffer_get_string(&m, &child_state.olen); |
1846 | 1853 | ||
1854 | /* Roaming */ | ||
1855 | if (compat20) { | ||
1856 | child_state.sent_bytes = buffer_get_int64(&m); | ||
1857 | child_state.recv_bytes = buffer_get_int64(&m); | ||
1858 | } | ||
1859 | |||
1847 | buffer_free(&m); | 1860 | buffer_free(&m); |
1848 | } | 1861 | } |
1849 | 1862 | ||