summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--session.c14
2 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bba7a665e..f328656b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
120010226 120010226
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
520010226 920010226
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 $
diff --git a/session.c b/session.c
index 3434aafc4..ee14afa68 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $"); 36RCSID("$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;