]>
Commit | Line | Data |
---|---|---|
d3f701b7 ER |
1 | diff -r -u -p1 openssh-4.3p1/buffer.c none-openssh-4.3p1/buffer.c |
2 | --- openssh-4.3p1/buffer.c 2005-03-14 07:22:26.000000000 -0500 | |
3 | +++ none-openssh-4.3p1/buffer.c 2006-02-01 11:08:29.000000000 -0500 | |
4 | @@ -109,3 +109,3 @@ restart: | |
5 | newlen = buffer->alloc + len + 32768; | |
6 | - if (newlen > BUFFER_MAX_LEN) | |
7 | + if (newlen > BUFFER_MAX_HPN_LEN) | |
8 | fatal("buffer_append_space: alloc %u not supported", | |
9 | diff -r -u -p1 openssh-4.3p1/buffer.h none-openssh-4.3p1/buffer.h | |
10 | --- openssh-4.3p1/buffer.h 2005-03-14 07:22:26.000000000 -0500 | |
11 | +++ none-openssh-4.3p1/buffer.h 2006-02-01 11:08:29.000000000 -0500 | |
12 | @@ -27,2 +27,3 @@ typedef struct { | |
13 | #define BUFFER_MAX_LEN 0xa00000 | |
14 | +#define BUFFER_MAX_HPN_LEN (2<<29)-1 | |
15 | ||
16 | diff -r -u -p1 openssh-4.3p1/channels.c none-openssh-4.3p1/channels.c | |
17 | --- openssh-4.3p1/channels.c 2006-01-31 05:47:15.000000000 -0500 | |
18 | +++ none-openssh-4.3p1/channels.c 2006-02-01 11:08:29.000000000 -0500 | |
19 | @@ -290,2 +290,3 @@ channel_new(char *ctype, int type, int r | |
20 | c->local_maxpacket = maxpack; | |
21 | + c->dynamic_window = 0; | |
22 | c->remote_id = -1; | |
23 | @@ -750,5 +751,5 @@ channel_pre_open(Channel *c, fd_set * re | |
24 | u_int limit = compat20 ? c->remote_window : packet_get_maxsize(); | |
25 | - | |
26 | + | |
27 | /* check buffer limits */ | |
28 | - limit = MIN(limit, (BUFFER_MAX_LEN - BUFFER_MAX_CHUNK - CHAN_RBUF)); | |
29 | + limit = MIN(limit, (BUFFER_MAX_HPN_LEN - BUFFER_MAX_CHUNK - CHAN_RBUF)); | |
30 | ||
31 | @@ -1617,5 +1618,20 @@ channel_check_window(Channel *c) | |
32 | c->local_consumed > 0) { | |
33 | + u_int32_t tcpwinsz = 0; | |
34 | + socklen_t optsz = sizeof(tcpwinsz); | |
35 | + int ret = -1; | |
36 | + u_int32_t addition = 0; | |
37 | + if (c->dynamic_window) { | |
38 | + ret = getsockopt(packet_get_connection_in(), | |
39 | + SOL_SOCKET, SO_RCVBUF, &tcpwinsz, &optsz); | |
40 | + if ((ret == 0) && tcpwinsz > BUFFER_MAX_HPN_LEN) | |
41 | + tcpwinsz = BUFFER_MAX_HPN_LEN; | |
42 | + } | |
43 | + if (c->dynamic_window && (ret == 0) && | |
44 | + (tcpwinsz > c->local_window_max)) { | |
45 | + addition = tcpwinsz - c->local_window_max; | |
46 | + c->local_window_max += addition; | |
47 | + } | |
48 | packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); | |
49 | packet_put_int(c->remote_id); | |
50 | - packet_put_int(c->local_consumed); | |
51 | + packet_put_int(c->local_consumed + addition); | |
52 | packet_send(); | |
53 | @@ -1624,3 +1640,3 @@ channel_check_window(Channel *c) | |
54 | c->local_consumed); | |
55 | - c->local_window += c->local_consumed; | |
56 | + c->local_window += c->local_consumed + addition; | |
57 | c->local_consumed = 0; | |
58 | diff -r -u -p1 openssh-4.3p1/channels.h none-openssh-4.3p1/channels.h | |
59 | --- openssh-4.3p1/channels.h 2005-12-31 00:22:32.000000000 -0500 | |
60 | +++ none-openssh-4.3p1/channels.h 2006-02-01 11:08:29.000000000 -0500 | |
61 | @@ -102,2 +102,3 @@ struct Channel { | |
62 | u_int local_maxpacket; | |
63 | + int dynamic_window; | |
64 | int extended_usage; | |
65 | @@ -126,7 +127,7 @@ struct Channel { | |
66 | #define CHAN_SES_PACKET_DEFAULT (32*1024) | |
67 | -#define CHAN_SES_WINDOW_DEFAULT (4*CHAN_SES_PACKET_DEFAULT) | |
68 | +#define CHAN_SES_WINDOW_DEFAULT (0xa00000/2) | |
69 | #define CHAN_TCP_PACKET_DEFAULT (32*1024) | |
70 | -#define CHAN_TCP_WINDOW_DEFAULT (4*CHAN_TCP_PACKET_DEFAULT) | |
71 | +#define CHAN_TCP_WINDOW_DEFAULT (0xa00000/2) | |
72 | #define CHAN_X11_PACKET_DEFAULT (16*1024) | |
73 | -#define CHAN_X11_WINDOW_DEFAULT (4*CHAN_X11_PACKET_DEFAULT) | |
74 | +#define CHAN_X11_WINDOW_DEFAULT (0xa00000/2) | |
75 | ||
76 | diff -r -u -p1 openssh-4.3p1/cipher.c none-openssh-4.3p1/cipher.c | |
77 | --- openssh-4.3p1/cipher.c 2005-12-19 01:40:40.000000000 -0500 | |
78 | +++ none-openssh-4.3p1/cipher.c 2006-02-01 11:08:29.000000000 -0500 | |
79 | @@ -153,3 +153,4 @@ ciphers_valid(const char *names) | |
80 | c = cipher_by_name(p); | |
81 | - if (c == NULL || c->number != SSH_CIPHER_SSH2) { | |
82 | + if (c == NULL || (c->number != SSH_CIPHER_SSH2 && | |
83 | +c->number != SSH_CIPHER_NONE)) { | |
84 | debug("bad cipher %s [%s]", p, names); | |
85 | @@ -327,2 +328,3 @@ cipher_get_keyiv(CipherContext *cc, u_ch | |
86 | switch (c->number) { | |
87 | + case SSH_CIPHER_NONE: | |
88 | case SSH_CIPHER_SSH2: | |
89 | @@ -361,2 +363,3 @@ cipher_set_keyiv(CipherContext *cc, u_ch | |
90 | switch (c->number) { | |
91 | + case SSH_CIPHER_NONE: | |
92 | case SSH_CIPHER_SSH2: | |
93 | diff -r -u -p1 openssh-4.3p1/compat.c none-openssh-4.3p1/compat.c | |
94 | --- openssh-4.3p1/compat.c 2005-03-01 05:24:33.000000000 -0500 | |
95 | +++ none-openssh-4.3p1/compat.c 2006-02-01 11:08:29.000000000 -0500 | |
96 | @@ -164,2 +164,10 @@ compat_datafellows(const char *version) | |
97 | datafellows = check[i].bugs; | |
98 | + /* Check to see if the remote side is OpenSSH and not HPN */ | |
99 | + if(strstr(version,"OpenSSH") != NULL) | |
100 | + { | |
101 | + if (strstr(version,"hpn") == NULL) | |
102 | + { | |
103 | + datafellows |= SSH_BUG_LARGEWINDOW; | |
104 | + } | |
105 | + } | |
106 | return; | |
107 | diff -r -u -p1 openssh-4.3p1/compat.h none-openssh-4.3p1/compat.h | |
108 | --- openssh-4.3p1/compat.h 2005-03-01 05:24:33.000000000 -0500 | |
109 | +++ none-openssh-4.3p1/compat.h 2006-02-01 11:08:29.000000000 -0500 | |
110 | @@ -58,2 +58,3 @@ | |
111 | #define SSH_OLD_FORWARD_ADDR 0x01000000 | |
112 | +#define SSH_BUG_LARGEWINDOW 0x02000000 | |
113 | ||
114 | diff -r -u -p1 openssh-4.3p1/kex.c none-openssh-4.3p1/kex.c | |
115 | --- openssh-4.3p1/kex.c 2005-11-04 23:19:36.000000000 -0500 | |
116 | +++ none-openssh-4.3p1/kex.c 2006-02-01 11:08:29.000000000 -0500 | |
117 | @@ -51,3 +51,3 @@ static void kex_choose_conf(Kex *); | |
118 | /* put algorithm proposal into buffer */ | |
119 | -static void | |
120 | +void | |
121 | kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX]) | |
122 | diff -r -u -p1 openssh-4.3p1/kex.h none-openssh-4.3p1/kex.h | |
123 | --- openssh-4.3p1/kex.h 2005-11-04 23:19:36.000000000 -0500 | |
124 | +++ none-openssh-4.3p1/kex.h 2006-02-01 11:08:29.000000000 -0500 | |
125 | @@ -125,2 +125,4 @@ struct Kex { | |
126 | ||
127 | +void kex_prop2buf(Buffer *, char *proposal[PROPOSAL_MAX]); | |
128 | + | |
129 | Kex *kex_setup(char *[PROPOSAL_MAX]); | |
130 | diff -r -u -p1 openssh-4.3p1/myproposal.h none-openssh-4.3p1/myproposal.h | |
131 | --- openssh-4.3p1/myproposal.h 2005-07-26 07:54:56.000000000 -0400 | |
132 | +++ none-openssh-4.3p1/myproposal.h 2006-02-01 11:08:29.000000000 -0500 | |
133 | @@ -33,3 +33,3 @@ | |
134 | "aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se," \ | |
135 | - "aes128-ctr,aes192-ctr,aes256-ctr" | |
136 | + "aes128-ctr,aes192-ctr,aes256-ctr,none" | |
137 | #define KEX_DEFAULT_MAC \ | |
138 | diff -r -u -p1 openssh-4.3p1/packet.c none-openssh-4.3p1/packet.c | |
139 | --- openssh-4.3p1/packet.c 2005-11-04 23:15:00.000000000 -0500 | |
140 | +++ none-openssh-4.3p1/packet.c 2006-02-01 11:08:29.000000000 -0500 | |
141 | @@ -1548,2 +1548,9 @@ packet_send_ignore(int nbytes) | |
142 | } | |
143 | +int rekey_requested = 0; | |
144 | + | |
145 | +void | |
146 | +packet_request_rekeying(void) | |
147 | +{ | |
148 | + rekey_requested = 1; | |
149 | +} | |
150 | ||
151 | @@ -1555,2 +1562,7 @@ packet_need_rekeying(void) | |
152 | return 0; | |
153 | + if (rekey_requested == 1) | |
154 | + { | |
155 | + rekey_requested = 0; | |
156 | + return 1; | |
157 | + } | |
158 | return | |
159 | diff -r -u -p1 openssh-4.3p1/packet.h none-openssh-4.3p1/packet.h | |
160 | --- openssh-4.3p1/packet.h 2005-07-26 07:54:56.000000000 -0400 | |
161 | +++ none-openssh-4.3p1/packet.h 2006-02-01 11:08:29.000000000 -0500 | |
162 | @@ -20,2 +20,5 @@ | |
163 | ||
164 | +void | |
165 | +packet_request_rekeying(void); | |
166 | + | |
167 | void packet_set_connection(int, int); | |
168 | diff -r -u -p1 openssh-4.3p1/readconf.c none-openssh-4.3p1/readconf.c | |
169 | --- openssh-4.3p1/readconf.c 2005-12-13 03:33:20.000000000 -0500 | |
170 | +++ none-openssh-4.3p1/readconf.c 2006-02-01 11:08:29.000000000 -0500 | |
171 | @@ -1018,2 +1018,3 @@ initialize_options(Options * options) | |
172 | options->server_alive_count_max = -1; | |
173 | + options->none_switch = -1; | |
174 | options->num_send_env = 0; | |
175 | @@ -1147,2 +1148,4 @@ fill_default_options(Options * options) | |
176 | options->server_alive_count_max = 3; | |
177 | + if (options->none_switch == -1) | |
178 | + options->none_switch = 0; | |
179 | if (options->control_master == -1) | |
180 | diff -r -u -p1 openssh-4.3p1/readconf.h none-openssh-4.3p1/readconf.h | |
181 | --- openssh-4.3p1/readconf.h 2005-12-13 03:29:02.000000000 -0500 | |
182 | +++ none-openssh-4.3p1/readconf.h 2006-02-01 11:08:29.000000000 -0500 | |
183 | @@ -59,2 +59,3 @@ typedef struct { | |
184 | int tcp_keep_alive; /* Set SO_KEEPALIVE. */ | |
185 | + int tcp_rcv_buf; /* user switch to set tcp recv buffer */ | |
186 | LogLevel log_level; /* Level for logging. */ | |
187 | @@ -104,2 +105,3 @@ typedef struct { | |
188 | int rekey_limit; | |
189 | + int none_switch; | |
190 | int no_host_authentication_for_localhost; | |
191 | diff -r -u -p1 openssh-4.3p1/scp.c none-openssh-4.3p1/scp.c | |
192 | --- openssh-4.3p1/scp.c 2006-01-31 06:11:38.000000000 -0500 | |
193 | +++ none-openssh-4.3p1/scp.c 2006-02-01 12:20:31.000000000 -0500 | |
194 | @@ -280,3 +280,3 @@ main(int argc, char **argv) | |
195 | fflag = tflag = 0; | |
196 | - while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246S:o:F:")) != -1) | |
197 | + while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246zS:o:F:R:")) != -1) | |
198 | switch (ch) { | |
199 | @@ -288,2 +288,3 @@ main(int argc, char **argv) | |
200 | case 'C': | |
201 | + case 'z': | |
202 | addargs(&args, "-%c", ch); | |
203 | @@ -341,2 +342,5 @@ main(int argc, char **argv) | |
204 | break; | |
205 | + case 'R': | |
206 | + addargs(&args, "-r%s", optarg); | |
207 | + break; | |
208 | default: | |
209 | @@ -555,3 +559,3 @@ source(int argc, char **argv) | |
210 | int fd = -1, haderr, indx; | |
211 | - char *last, *name, buf[2048]; | |
212 | + char *last, *name, buf[16384]; | |
213 | int len; | |
214 | @@ -782,3 +786,3 @@ sink(int argc, char **argv) | |
215 | int setimes, targisdir, wrerrno = 0; | |
216 | - char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; | |
217 | + char ch, *cp, *np, *targ, *why, *vect[1], buf[16384]; | |
218 | struct timeval tv[2]; | |
219 | @@ -943,3 +947,3 @@ bad: run_err("%s: %s", np, strerror(er | |
220 | (void) atomicio(vwrite, remout, "", 1); | |
221 | - if ((bp = allocbuf(&buffer, ofd, 4096)) == NULL) { | |
222 | + if ((bp = allocbuf(&buffer, ofd, sizeof(buf))) == NULL) { | |
223 | (void) close(ofd); | |
224 | @@ -953,4 +957,4 @@ bad: run_err("%s: %s", np, strerror(er | |
225 | start_progress_meter(curfile, size, &statbytes); | |
226 | - for (count = i = 0; i < size; i += 4096) { | |
227 | - amt = 4096; | |
228 | + for (count = i = 0; i < size; i += sizeof(buf)) { | |
229 | + amt = sizeof(buf); | |
230 | if (i + amt > size) | |
231 | @@ -971,3 +975,3 @@ bad: run_err("%s: %s", np, strerror(er | |
232 | if (limit_rate) | |
233 | - bwlimit(4096); | |
234 | + bwlimit(sizeof(buf)); | |
235 | ||
236 | @@ -1087,3 +1091,3 @@ usage(void) | |
237 | "usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n" | |
238 | - " [-l limit] [-o ssh_option] [-P port] [-S program]\n" | |
239 | + " [-l limit] [-o ssh_option] [-P port] [-R Receive buffer size (Kb)] [-S program]\n" | |
240 | " [[user@]host1:]file1 [...] [[user@]host2:]file2\n"); | |
241 | Only in none-openssh-4.3p1/: scp.c.rej | |
242 | diff -r -u -p1 openssh-4.3p1/serverloop.c none-openssh-4.3p1/serverloop.c | |
243 | --- openssh-4.3p1/serverloop.c 2005-12-31 00:33:37.000000000 -0500 | |
244 | +++ none-openssh-4.3p1/serverloop.c 2006-02-01 11:08:29.000000000 -0500 | |
245 | @@ -977,2 +977,4 @@ server_request_session(void) | |
246 | 0, "server-session", 1); | |
247 | + if (!(datafellows & SSH_BUG_LARGEWINDOW)) | |
248 | + c->dynamic_window = 1; | |
249 | if (session_open(the_authctxt, c->self) != 1) { | |
250 | diff -r -u -p1 openssh-4.3p1/sftp.c none-openssh-4.3p1/sftp.c | |
251 | --- openssh-4.3p1/sftp.c 2006-01-31 05:49:28.000000000 -0500 | |
252 | +++ none-openssh-4.3p1/sftp.c 2006-02-01 08:28:26.000000000 -0500 | |
253 | @@ -1466,3 +1466,3 @@ main(int argc, char **argv) | |
254 | ||
255 | - while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:")) != -1) { | |
256 | + while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:z")) != -1) { | |
257 | switch (ch) { | |
258 | @@ -1521,2 +1521,5 @@ main(int argc, char **argv) | |
259 | case 'h': | |
260 | + case 'z': | |
261 | + addargs(&args, "-%c", ch); | |
262 | + break; | |
263 | default: | |
264 | diff -r -u -p1 openssh-4.3p1/ssh.c none-openssh-4.3p1/ssh.c | |
265 | --- openssh-4.3p1/ssh.c 2005-12-31 00:33:37.000000000 -0500 | |
266 | +++ none-openssh-4.3p1/ssh.c 2006-02-01 08:30:30.000000000 -0500 | |
3c2fdea7 ER |
267 | @@ -160,7 +160,7 @@ |
268 | usage(void) | |
269 | { | |
d3f701b7 | 270 | fprintf(stderr, |
3c2fdea7 ER |
271 | -"usage: ssh [-1246AaBCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]\n" |
272 | +"usage: ssh [-1246AaBCfgkMNnqRrsTtVvXxY] [-b bind_address] [-c cipher_spec]\n" | |
d3f701b7 | 273 | " [-D [bind_address:]port] [-e escape_char] [-F configfile]\n" |
3c2fdea7 ER |
274 | " [-i identity_file] [-L [bind_address:]port:host:hostport]\n" |
275 | " [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n" | |
d3f701b7 ER |
276 | @@ -165,2 +165,3 @@ usage(void) |
277 | " [-w tunnel:tunnel] [user@]hostname [command]\n" | |
278 | +" [-r Receive Buffer Size in K]\n" | |
279 | ); | |
3c2fdea7 ER |
280 | @@ -246,9 +246,12 @@ |
281 | /* Parse command-line arguments. */ | |
d3f701b7 | 282 | host = NULL; |
3c2fdea7 | 283 | |
d3f701b7 ER |
284 | + /* need to set options.tcp_rcv_buf to 0 */ |
285 | + options.tcp_rcv_buf = 0; | |
3c2fdea7 ER |
286 | + |
287 | again: | |
d3f701b7 | 288 | while ((opt = getopt(ac, av, |
3c2fdea7 ER |
289 | - "1246ab:c:e:fgi:kl:m:no:p:qstvxABCD:F:I:L:MNO:PR:S:TVw:XY")) != -1) { |
290 | + "1246ab:c:e:fgi:kl:m:no:p:qr:stvxABCD:F:I:L:MNO:PR:S:TVw:XY")) != -1) { | |
d3f701b7 | 291 | switch (opt) { |
3c2fdea7 ER |
292 | case '1': |
293 | options.protocol = SSH_PROTO_1; | |
d3f701b7 ER |
294 | @@ -474,2 +477,3 @@ again: |
295 | no_tty_flag = 1; | |
296 | + options.none_switch = 0; | |
297 | break; | |
298 | @@ -497,2 +501,13 @@ again: | |
299 | break; | |
300 | + case 'r': | |
301 | + options.tcp_rcv_buf = atoi(optarg) * 1024; | |
302 | + break; | |
303 | + case 'z': | |
304 | + /* make sure we can't turn on the none_switch */ | |
305 | + /* if they try to force a no tty flag on a tty session */ | |
306 | + if (!no_tty_flag) { | |
307 | + options.none_switch = 1; | |
308 | + } | |
309 | + break; | |
310 | + | |
311 | default: | |
312 | @@ -1132,2 +1147,3 @@ ssh_session2_open(void) | |
313 | if (tty_flag) { | |
314 | + window = 4*CHAN_SES_PACKET_DEFAULT; | |
315 | window >>= 1; | |
316 | @@ -1139,3 +1155,5 @@ ssh_session2_open(void) | |
317 | "client-session", /*nonblock*/0); | |
318 | - | |
319 | + if (!tty_flag && (!(datafellows & SSH_BUG_LARGEWINDOW))) { | |
320 | + c->dynamic_window = 1; | |
321 | + } | |
322 | debug3("ssh_session2_open: channel_new: %d", c->self); | |
323 | Only in none-openssh-4.3p1/: ssh.c.rej | |
324 | diff -r -u -p1 openssh-4.3p1/sshconnect.c none-openssh-4.3p1/sshconnect.c | |
325 | --- openssh-4.3p1/sshconnect.c 2005-12-13 03:29:03.000000000 -0500 | |
326 | +++ none-openssh-4.3p1/sshconnect.c 2006-02-01 11:08:29.000000000 -0500 | |
327 | @@ -168,2 +168,25 @@ ssh_create_socket(int privileged, struct | |
328 | debug("Allocated local port %d.", p); | |
329 | + | |
330 | + | |
331 | + /* tuning needs to happen after the socket is */ | |
332 | + /* created but before the connection happens */ | |
333 | + /* so winscale is negotiated properly -cjr */ | |
334 | + | |
335 | + /* Set tcp receive buffer if requested */ | |
336 | + if (options.tcp_rcv_buf) | |
337 | + { | |
338 | + if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, | |
339 | + (void *)&options.tcp_rcv_buf, | |
340 | + sizeof(options.tcp_rcv_buf)) >= 0) | |
341 | + { | |
342 | + debug("setsockopt SO_RCVBUF: %.100s", strerror(errno)); | |
343 | + } | |
344 | + else | |
345 | + { | |
346 | + /* coudln't set the socket size to use spec. */ | |
347 | + /* should default to system param and continue */ | |
348 | + /* warn the user though - cjr */ | |
349 | + error("Couldn't set socket receive buffer as requested. Continuing anyway."); | |
350 | + } | |
351 | + } | |
352 | return sock; | |
353 | @@ -173,4 +196,26 @@ ssh_create_socket(int privileged, struct | |
354 | error("socket: %.100s", strerror(errno)); | |
355 | - | |
356 | - /* Bind the socket to an alternative local IP address */ | |
357 | + | |
358 | + /* tuning needs to happen after the socket is */ | |
359 | + /* created but before the connection happens */ | |
360 | + /* so winscale is negotiated properly -cjr */ | |
361 | + | |
362 | + /* Set tcp receive buffer if requested */ | |
363 | + if (options.tcp_rcv_buf) | |
364 | + { | |
365 | + if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, | |
366 | + (void *)&options.tcp_rcv_buf, | |
367 | + sizeof(options.tcp_rcv_buf)) >= 0) | |
368 | + { | |
369 | + debug("setsockopt SO_RCVBUF: %.100s", strerror(errno)); | |
370 | + } | |
371 | + else | |
372 | + { | |
373 | + /* coudln't set the socket size to use spec. */ | |
374 | + /* should default to system param and continue */ | |
375 | + /* warn the user though - cjr */ | |
376 | + error("Couldn't set socket receive buffer as requested. Continuing anyway."); | |
377 | + } | |
378 | + } | |
379 | + | |
380 | + /* Bind the socket to an alternative local IP address */ | |
381 | if (options.bind_address == NULL) | |
382 | @@ -481,3 +526,3 @@ ssh_exchange_identification(void) | |
383 | compat20 ? PROTOCOL_MINOR_2 : minor1, | |
384 | - SSH_VERSION); | |
385 | + SSH_RELEASE); | |
386 | if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) | |
387 | diff -r -u -p1 openssh-4.3p1/sshconnect2.c none-openssh-4.3p1/sshconnect2.c | |
388 | --- openssh-4.3p1/sshconnect2.c 2005-11-04 23:07:33.000000000 -0500 | |
389 | +++ none-openssh-4.3p1/sshconnect2.c 2006-02-01 11:08:29.000000000 -0500 | |
390 | @@ -60,2 +60,8 @@ extern char *server_version_string; | |
391 | extern Options options; | |
392 | +extern Kex *xxx_kex; | |
393 | + | |
394 | +/* tty_flag is set in ssh.c. use this in ssh_userauth2 */ | |
395 | +/* if it is set then prevent the switch to the null cipher */ | |
396 | + | |
397 | +extern int tty_flag; | |
398 | ||
399 | @@ -311,3 +317,11 @@ ssh_userauth2(const char *local_user, co | |
400 | dispatch_range(SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); | |
401 | - | |
402 | + if ((options.none_switch == 1) && !tty_flag) /* no null on tty sessions */ | |
403 | + { | |
404 | + debug("Requesting none rekeying..."); | |
405 | + myproposal[PROPOSAL_ENC_ALGS_STOC] = "none"; | |
406 | + myproposal[PROPOSAL_ENC_ALGS_CTOS] = "none"; | |
407 | + kex_prop2buf(&xxx_kex->my,myproposal); | |
408 | + packet_request_rekeying(); | |
409 | + fprintf(stderr, "WARNING: ENABLED NULL CIPHER\n"); | |
410 | + } | |
411 | debug("Authentication succeeded (%s).", authctxt.method->name); | |
412 | diff -r -u -p1 openssh-4.3p1/sshd.c none-openssh-4.3p1/sshd.c | |
413 | --- openssh-4.3p1/sshd.c 2005-12-23 22:59:12.000000000 -0500 | |
414 | +++ none-openssh-4.3p1/sshd.c 2006-02-01 11:08:30.000000000 -0500 | |
415 | @@ -379,3 +379,3 @@ sshd_exchange_identification(int sock_in | |
416 | } | |
417 | - snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); | |
418 | + snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_RELEASE); | |
419 | server_version_string = xstrdup(buf); | |
420 | diff -r -u -p1 openssh-4.3p1/version.h none-openssh-4.3p1/version.h | |
421 | --- openssh-4.3p1/version.h 2006-02-01 06:27:31.000000000 -0500 | |
422 | +++ none-openssh-4.3p1/version.h 2006-02-01 11:08:30.000000000 -0500 | |
423 | @@ -5,2 +5,3 @@ | |
424 | #define SSH_PORTABLE "p1" | |
425 | -#define SSH_RELEASE SSH_VERSION SSH_PORTABLE | |
426 | +#define SSH_HPN "-hpn" | |
427 | +#define SSH_RELEASE SSH_VERSION SSH_PORTABLE SSH_HPN |