summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 10 insertions, 4 deletions
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;