summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-09-23 18:08:35 +0000
committerColin Watson <cjwatson@debian.org>2003-09-23 18:08:35 +0000
commitd59fd3e421aa81b8e5e118f3f806081df2aca879 (patch)
tree356a4e607edc979c625bb33db63c656d771478bd /serverloop.c
parent7505658c58e96b8d270f1928a0e1fa7f3e0c266b (diff)
parent45431c9b4677608680cd071768cbf156b316a7e8 (diff)
Merge 3.7.1p2 to the trunk. I have absolutely no idea yet whether this will
work.
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/serverloop.c b/serverloop.c
index 050081018..6dbb4fd12 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.106 2003/04/01 10:22:21 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.110 2003/06/24 08:23:46 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -158,7 +158,7 @@ sigchld_handler(int sig)
158static void 158static void
159make_packets_from_stderr_data(void) 159make_packets_from_stderr_data(void)
160{ 160{
161 int len; 161 u_int len;
162 162
163 /* Send buffered stderr data to the client. */ 163 /* Send buffered stderr data to the client. */
164 while (buffer_len(&stderr_buffer) > 0 && 164 while (buffer_len(&stderr_buffer) > 0 &&
@@ -187,7 +187,7 @@ make_packets_from_stderr_data(void)
187static void 187static void
188make_packets_from_stdout_data(void) 188make_packets_from_stdout_data(void)
189{ 189{
190 int len; 190 u_int len;
191 191
192 /* Send buffered stdout data to the client. */ 192 /* Send buffered stdout data to the client. */
193 while (buffer_len(&stdout_buffer) > 0 && 193 while (buffer_len(&stdout_buffer) > 0 &&
@@ -771,8 +771,14 @@ server_loop2(Authctxt *authctxt)
771 &nalloc, 0); 771 &nalloc, 0);
772 772
773 collect_children(); 773 collect_children();
774 if (!rekeying) 774 if (!rekeying) {
775 channel_after_select(readset, writeset); 775 channel_after_select(readset, writeset);
776 if (packet_need_rekeying()) {
777 debug("need rekeying");
778 xxx_kex->done = 0;
779 kex_send_kexinit(xxx_kex);
780 }
781 }
776 process_input(readset); 782 process_input(readset);
777 if (connection_closed) 783 if (connection_closed)
778 break; 784 break;
@@ -874,7 +880,7 @@ server_request_direct_tcpip(char *ctype)
874 return NULL; 880 return NULL;
875 c = channel_new(ctype, SSH_CHANNEL_CONNECTING, 881 c = channel_new(ctype, SSH_CHANNEL_CONNECTING,
876 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, 882 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
877 CHAN_TCP_PACKET_DEFAULT, 0, xstrdup("direct-tcpip"), 1); 883 CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1);
878 return c; 884 return c;
879} 885}
880 886
@@ -893,7 +899,7 @@ server_request_session(char *ctype)
893 */ 899 */
894 c = channel_new(ctype, SSH_CHANNEL_LARVAL, 900 c = channel_new(ctype, SSH_CHANNEL_LARVAL,
895 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT, 901 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
896 0, xstrdup("server-session"), 1); 902 0, "server-session", 1);
897 if (session_open(xxx_authctxt, c->self) != 1) { 903 if (session_open(xxx_authctxt, c->self) != 1) {
898 debug("session open failed, free channel %d", c->self); 904 debug("session open failed, free channel %d", c->self);
899 channel_free(c); 905 channel_free(c);
@@ -971,7 +977,7 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
971 pw = auth_get_user(); 977 pw = auth_get_user();
972 if (pw == NULL) 978 if (pw == NULL)
973 fatal("server_input_global_request: no user"); 979 fatal("server_input_global_request: no user");
974 listen_address = packet_get_string(NULL); /* XXX currently ignored */ 980 listen_address = packet_get_string(NULL);
975 listen_port = (u_short)packet_get_int(); 981 listen_port = (u_short)packet_get_int();
976 debug("server_input_global_request: tcpip-forward listen %s port %d", 982 debug("server_input_global_request: tcpip-forward listen %s port %d",
977 listen_address, listen_port); 983 listen_address, listen_port);