- markus@cvs.openbsd.org 2001/02/23 15:37:45
[session.c] handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients
This commit is contained in:
parent
10b9bf95c0
commit
7603b2d244
|
@ -1,6 +1,10 @@
|
||||||
20010226
|
20010226
|
||||||
- (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen
|
- (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen
|
||||||
<vinschen@redhat.com>
|
<vinschen@redhat.com>
|
||||||
|
- (bal) OpenBSD Sync
|
||||||
|
- markus@cvs.openbsd.org 2001/02/23 15:37:45
|
||||||
|
[session.c]
|
||||||
|
handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients
|
||||||
|
|
||||||
20010226
|
20010226
|
||||||
- (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again.
|
- (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again.
|
||||||
|
@ -4135,4 +4139,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.824 2001/02/26 20:04:45 mouring Exp $
|
$Id: ChangeLog,v 1.825 2001/02/26 20:13:32 mouring Exp $
|
||||||
|
|
14
session.c
14
session.c
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $");
|
RCSID("$OpenBSD: session.c,v 1.57 2001/02/23 15:37:45 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -216,6 +216,7 @@ do_authenticated(struct passwd * pw)
|
||||||
int n_bytes;
|
int n_bytes;
|
||||||
int plen;
|
int plen;
|
||||||
u_int proto_len, data_len, dlen;
|
u_int proto_len, data_len, dlen;
|
||||||
|
int screen_flag;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cancel the alarm we set to limit the time taken for
|
* Cancel the alarm we set to limit the time taken for
|
||||||
|
@ -340,13 +341,18 @@ do_authenticated(struct passwd * pw)
|
||||||
s->auth_proto = packet_get_string(&proto_len);
|
s->auth_proto = packet_get_string(&proto_len);
|
||||||
s->auth_data = packet_get_string(&data_len);
|
s->auth_data = packet_get_string(&data_len);
|
||||||
|
|
||||||
if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER) {
|
screen_flag = packet_get_protocol_flags() &
|
||||||
debug2("SSH_PROTOFLAG_SCREEN_NUMBER == true");
|
SSH_PROTOFLAG_SCREEN_NUMBER;
|
||||||
|
debug2("SSH_PROTOFLAG_SCREEN_NUMBER: %d", screen_flag);
|
||||||
|
|
||||||
|
if (packet_remaining() == 4) {
|
||||||
|
if (!screen_flag)
|
||||||
|
debug2("Buggy client: "
|
||||||
|
"X11 screen flag missing");
|
||||||
packet_integrity_check(plen,
|
packet_integrity_check(plen,
|
||||||
4 + proto_len + 4 + data_len + 4, type);
|
4 + proto_len + 4 + data_len + 4, type);
|
||||||
s->screen = packet_get_int();
|
s->screen = packet_get_int();
|
||||||
} else {
|
} else {
|
||||||
debug2("SSH_PROTOFLAG_SCREEN_NUMBER == false");
|
|
||||||
packet_integrity_check(plen,
|
packet_integrity_check(plen,
|
||||||
4 + proto_len + 4 + data_len, type);
|
4 + proto_len + 4 + data_len, type);
|
||||||
s->screen = 0;
|
s->screen = 0;
|
||||||
|
|
Loading…
Reference in New Issue