diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-26 20:13:32 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-26 20:13:32 +0000 |
commit | 7603b2d244c9aeacacc78b246594bea011c48bd7 (patch) | |
tree | f8306bf38eb1ae22362d16ac035b4aa3435022fc | |
parent | 10b9bf95c07c0fb81f46b2df0e09afd7d3d1847b (diff) |
- markus@cvs.openbsd.org 2001/02/23 15:37:45
[session.c]
handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | session.c | 14 |
2 files changed, 15 insertions, 5 deletions
@@ -1,6 +1,10 @@ | |||
1 | 20010226 | 1 | 20010226 |
2 | - (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen | 2 | - (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen |
3 | <vinschen@redhat.com> | 3 | <vinschen@redhat.com> |
4 | - (bal) OpenBSD Sync | ||
5 | - markus@cvs.openbsd.org 2001/02/23 15:37:45 | ||
6 | [session.c] | ||
7 | handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients | ||
4 | 8 | ||
5 | 20010226 | 9 | 20010226 |
6 | - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again. | 10 | - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again. |
@@ -4135,4 +4139,4 @@ | |||
4135 | - Wrote replacements for strlcpy and mkdtemp | 4139 | - Wrote replacements for strlcpy and mkdtemp |
4136 | - Released 1.0pre1 | 4140 | - Released 1.0pre1 |
4137 | 4141 | ||
4138 | $Id: ChangeLog,v 1.824 2001/02/26 20:04:45 mouring Exp $ | 4142 | $Id: ChangeLog,v 1.825 2001/02/26 20:13:32 mouring Exp $ |
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.57 2001/02/23 15:37:45 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -216,6 +216,7 @@ do_authenticated(struct passwd * pw) | |||
216 | int n_bytes; | 216 | int n_bytes; |
217 | int plen; | 217 | int plen; |
218 | u_int proto_len, data_len, dlen; | 218 | u_int proto_len, data_len, dlen; |
219 | int screen_flag; | ||
219 | 220 | ||
220 | /* | 221 | /* |
221 | * Cancel the alarm we set to limit the time taken for | 222 | * Cancel the alarm we set to limit the time taken for |
@@ -340,13 +341,18 @@ do_authenticated(struct passwd * pw) | |||
340 | s->auth_proto = packet_get_string(&proto_len); | 341 | s->auth_proto = packet_get_string(&proto_len); |
341 | s->auth_data = packet_get_string(&data_len); | 342 | s->auth_data = packet_get_string(&data_len); |
342 | 343 | ||
343 | if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER) { | 344 | screen_flag = packet_get_protocol_flags() & |
344 | debug2("SSH_PROTOFLAG_SCREEN_NUMBER == true"); | 345 | SSH_PROTOFLAG_SCREEN_NUMBER; |
346 | debug2("SSH_PROTOFLAG_SCREEN_NUMBER: %d", screen_flag); | ||
347 | |||
348 | if (packet_remaining() == 4) { | ||
349 | if (!screen_flag) | ||
350 | debug2("Buggy client: " | ||
351 | "X11 screen flag missing"); | ||
345 | packet_integrity_check(plen, | 352 | packet_integrity_check(plen, |
346 | 4 + proto_len + 4 + data_len + 4, type); | 353 | 4 + proto_len + 4 + data_len + 4, type); |
347 | s->screen = packet_get_int(); | 354 | s->screen = packet_get_int(); |
348 | } else { | 355 | } else { |
349 | debug2("SSH_PROTOFLAG_SCREEN_NUMBER == false"); | ||
350 | packet_integrity_check(plen, | 356 | packet_integrity_check(plen, |
351 | 4 + proto_len + 4 + data_len, type); | 357 | 4 + proto_len + 4 + data_len, type); |
352 | s->screen = 0; | 358 | s->screen = 0; |