diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/channels.c b/channels.c index 8c0a7a455..3c2f15f2a 100644 --- a/channels.c +++ b/channels.c | |||
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: channels.c,v 1.76 2000/12/19 22:43:44 markus Exp $"); | 43 | RCSID("$OpenBSD: channels.c,v 1.77 2000/12/19 23:17:56 markus Exp $"); |
44 | 44 | ||
45 | #include "ssh.h" | 45 | #include "ssh.h" |
46 | #include "packet.h" | 46 | #include "packet.h" |
@@ -95,14 +95,14 @@ char *x11_saved_proto = NULL; | |||
95 | 95 | ||
96 | /* Saved X11 authentication data. This is the real data. */ | 96 | /* Saved X11 authentication data. This is the real data. */ |
97 | char *x11_saved_data = NULL; | 97 | char *x11_saved_data = NULL; |
98 | unsigned int x11_saved_data_len = 0; | 98 | u_int x11_saved_data_len = 0; |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * Fake X11 authentication data. This is what the server will be sending us; | 101 | * Fake X11 authentication data. This is what the server will be sending us; |
102 | * we should replace any occurrences of this by the real data. | 102 | * we should replace any occurrences of this by the real data. |
103 | */ | 103 | */ |
104 | char *x11_fake_data = NULL; | 104 | char *x11_fake_data = NULL; |
105 | unsigned int x11_fake_data_len; | 105 | u_int x11_fake_data_len; |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * Data structure for storing which hosts are permitted for forward requests. | 108 | * Data structure for storing which hosts are permitted for forward requests. |
@@ -436,15 +436,15 @@ channel_pre_output_draining(Channel *c, fd_set * readset, fd_set * writeset) | |||
436 | int | 436 | int |
437 | x11_open_helper(Channel *c) | 437 | x11_open_helper(Channel *c) |
438 | { | 438 | { |
439 | unsigned char *ucp; | 439 | u_char *ucp; |
440 | unsigned int proto_len, data_len; | 440 | u_int proto_len, data_len; |
441 | 441 | ||
442 | /* Check if the fixed size part of the packet is in buffer. */ | 442 | /* Check if the fixed size part of the packet is in buffer. */ |
443 | if (buffer_len(&c->output) < 12) | 443 | if (buffer_len(&c->output) < 12) |
444 | return 0; | 444 | return 0; |
445 | 445 | ||
446 | /* Parse the lengths of variable-length fields. */ | 446 | /* Parse the lengths of variable-length fields. */ |
447 | ucp = (unsigned char *) buffer_ptr(&c->output); | 447 | ucp = (u_char *) buffer_ptr(&c->output); |
448 | if (ucp[0] == 0x42) { /* Byte order MSB first. */ | 448 | if (ucp[0] == 0x42) { /* Byte order MSB first. */ |
449 | proto_len = 256 * ucp[6] + ucp[7]; | 449 | proto_len = 256 * ucp[6] + ucp[7]; |
450 | data_len = 256 * ucp[8] + ucp[9]; | 450 | data_len = 256 * ucp[8] + ucp[9]; |
@@ -1066,7 +1066,7 @@ channel_input_data(int type, int plen, void *ctxt) | |||
1066 | { | 1066 | { |
1067 | int id; | 1067 | int id; |
1068 | char *data; | 1068 | char *data; |
1069 | unsigned int data_len; | 1069 | u_int data_len; |
1070 | Channel *c; | 1070 | Channel *c; |
1071 | 1071 | ||
1072 | /* Get the channel number and verify it. */ | 1072 | /* Get the channel number and verify it. */ |
@@ -1112,7 +1112,7 @@ channel_input_extended_data(int type, int plen, void *ctxt) | |||
1112 | int id; | 1112 | int id; |
1113 | int tcode; | 1113 | int tcode; |
1114 | char *data; | 1114 | char *data; |
1115 | unsigned int data_len; | 1115 | u_int data_len; |
1116 | Channel *c; | 1116 | Channel *c; |
1117 | 1117 | ||
1118 | /* Get the channel number and verify it. */ | 1118 | /* Get the channel number and verify it. */ |
@@ -1155,7 +1155,7 @@ channel_input_extended_data(int type, int plen, void *ctxt) | |||
1155 | int | 1155 | int |
1156 | channel_not_very_much_buffered_data() | 1156 | channel_not_very_much_buffered_data() |
1157 | { | 1157 | { |
1158 | unsigned int i; | 1158 | u_int i; |
1159 | Channel *c; | 1159 | Channel *c; |
1160 | 1160 | ||
1161 | for (i = 0; i < channels_alloc; i++) { | 1161 | for (i = 0; i < channels_alloc; i++) { |
@@ -1423,7 +1423,7 @@ channel_max_fd() | |||
1423 | int | 1423 | int |
1424 | channel_still_open() | 1424 | channel_still_open() |
1425 | { | 1425 | { |
1426 | unsigned int i; | 1426 | u_int i; |
1427 | for (i = 0; i < channels_alloc; i++) | 1427 | for (i = 0; i < channels_alloc; i++) |
1428 | switch (channels[i].type) { | 1428 | switch (channels[i].type) { |
1429 | case SSH_CHANNEL_FREE: | 1429 | case SSH_CHANNEL_FREE: |
@@ -1786,7 +1786,7 @@ channel_input_port_open(int type, int plen, void *ctxt) | |||
1786 | u_short host_port; | 1786 | u_short host_port; |
1787 | char *host, *originator_string; | 1787 | char *host, *originator_string; |
1788 | int remote_channel, sock = -1, newch, i, denied; | 1788 | int remote_channel, sock = -1, newch, i, denied; |
1789 | unsigned int host_len, originator_len; | 1789 | u_int host_len, originator_len; |
1790 | 1790 | ||
1791 | /* Get remote channel number. */ | 1791 | /* Get remote channel number. */ |
1792 | remote_channel = packet_get_int(); | 1792 | remote_channel = packet_get_int(); |
@@ -1996,7 +1996,7 @@ x11_create_display_inet(int screen_number, int x11_display_offset) | |||
1996 | 1996 | ||
1997 | static | 1997 | static |
1998 | int | 1998 | int |
1999 | connect_local_xsocket(unsigned int dnr) | 1999 | connect_local_xsocket(u_int dnr) |
2000 | { | 2000 | { |
2001 | static const char *const x_sockets[] = { | 2001 | static const char *const x_sockets[] = { |
2002 | X_UNIX_PATH "%u", | 2002 | X_UNIX_PATH "%u", |
@@ -2129,7 +2129,7 @@ x11_input_open(int type, int plen, void *ctxt) | |||
2129 | { | 2129 | { |
2130 | int remote_channel, sock = 0, newch; | 2130 | int remote_channel, sock = 0, newch; |
2131 | char *remote_host; | 2131 | char *remote_host; |
2132 | unsigned int remote_len; | 2132 | u_int remote_len; |
2133 | 2133 | ||
2134 | /* Get remote channel number. */ | 2134 | /* Get remote channel number. */ |
2135 | remote_channel = packet_get_int(); | 2135 | remote_channel = packet_get_int(); |
@@ -2200,8 +2200,8 @@ void | |||
2200 | x11_request_forwarding_with_spoofing(int client_session_id, | 2200 | x11_request_forwarding_with_spoofing(int client_session_id, |
2201 | const char *proto, const char *data) | 2201 | const char *proto, const char *data) |
2202 | { | 2202 | { |
2203 | unsigned int data_len = (unsigned int) strlen(data) / 2; | 2203 | u_int data_len = (u_int) strlen(data) / 2; |
2204 | unsigned int i, value; | 2204 | u_int i, value; |
2205 | char *new_data; | 2205 | char *new_data; |
2206 | int screen_number; | 2206 | int screen_number; |
2207 | const char *cp; | 2207 | const char *cp; |
@@ -2241,7 +2241,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, | |||
2241 | /* Convert the fake data into hex. */ | 2241 | /* Convert the fake data into hex. */ |
2242 | new_data = xmalloc(2 * data_len + 1); | 2242 | new_data = xmalloc(2 * data_len + 1); |
2243 | for (i = 0; i < data_len; i++) | 2243 | for (i = 0; i < data_len; i++) |
2244 | sprintf(new_data + 2 * i, "%02x", (unsigned char) x11_fake_data[i]); | 2244 | sprintf(new_data + 2 * i, "%02x", (u_char) x11_fake_data[i]); |
2245 | 2245 | ||
2246 | /* Send the request packet. */ | 2246 | /* Send the request packet. */ |
2247 | if (compat20) { | 2247 | if (compat20) { |