зеркало из https://github.com/Azure/sonic-openssh.git
- deraadt@cvs.openbsd.org 2002/06/23 21:06:41
[channels.c channels.h session.c session.h] display, screen, row, col, xpixel, ypixel are u_int; markus ok - (bal) Also fixed IPADDR_IN_DISPLAY case where display, screen, row, col, xpixel are u_int.
This commit is contained in:
Родитель
8ada5d0d0d
Коммит
a9d2c89fc5
|
@ -29,6 +29,12 @@
|
||||||
- deraadt@cvs.openbsd.org 2002/06/23 21:06:13
|
- deraadt@cvs.openbsd.org 2002/06/23 21:06:13
|
||||||
[sshpty.c]
|
[sshpty.c]
|
||||||
KNF
|
KNF
|
||||||
|
- deraadt@cvs.openbsd.org 2002/06/23 21:06:41
|
||||||
|
[channels.c channels.h session.c session.h]
|
||||||
|
display, screen, row, col, xpixel, ypixel are u_int; markus ok
|
||||||
|
- (bal) Also fixed IPADDR_IN_DISPLAY case where display, screen, row, col,
|
||||||
|
xpixel are u_int.
|
||||||
|
|
||||||
|
|
||||||
20020623
|
20020623
|
||||||
- (stevesk) [configure.ac] bug #255 LOGIN_NEEDS_UTMPX for AIX.
|
- (stevesk) [configure.ac] bug #255 LOGIN_NEEDS_UTMPX for AIX.
|
||||||
|
@ -1073,4 +1079,4 @@
|
||||||
- (stevesk) entropy.c: typo in debug message
|
- (stevesk) entropy.c: typo in debug message
|
||||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2262 2002/06/23 21:42:50 mouring Exp $
|
$Id: ChangeLog,v 1.2263 2002/06/23 21:48:28 mouring Exp $
|
||||||
|
|
11
channels.c
11
channels.c
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: channels.c,v 1.175 2002/06/10 22:28:41 markus Exp $");
|
RCSID("$OpenBSD: channels.c,v 1.176 2002/06/23 21:06:41 deraadt Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -2328,12 +2328,12 @@ channel_connect_to(const char *host, u_short port)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates an internet domain socket for listening for X11 connections.
|
* Creates an internet domain socket for listening for X11 connections.
|
||||||
* Returns a suitable display number for the DISPLAY variable, or -1 if
|
* Returns 0 and a suitable display number for the DISPLAY variable
|
||||||
* an error occurs.
|
* stored in display_numberp , or -1 if an error occurs.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
|
x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
|
||||||
int single_connection)
|
int single_connection, u_int *display_numberp)
|
||||||
{
|
{
|
||||||
Channel *nc = NULL;
|
Channel *nc = NULL;
|
||||||
int display_number, sock;
|
int display_number, sock;
|
||||||
|
@ -2431,7 +2431,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the display number for the DISPLAY environment variable. */
|
/* Return the display number for the DISPLAY environment variable. */
|
||||||
return display_number;
|
*display_numberp = display_number;
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: channels.h,v 1.68 2002/06/10 22:28:41 markus Exp $ */
|
/* $OpenBSD: channels.h,v 1.69 2002/06/23 21:06:41 deraadt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
|
@ -205,7 +205,7 @@ int channel_setup_remote_fwd_listener(const char *, u_short, int);
|
||||||
/* x11 forwarding */
|
/* x11 forwarding */
|
||||||
|
|
||||||
int x11_connect_display(void);
|
int x11_connect_display(void);
|
||||||
int x11_create_display_inet(int, int, int);
|
int x11_create_display_inet(int, int, int, u_int *);
|
||||||
void x11_input_open(int, u_int32_t, void *);
|
void x11_input_open(int, u_int32_t, void *);
|
||||||
void x11_request_forwarding_with_spoofing(int, const char *, const char *);
|
void x11_request_forwarding_with_spoofing(int, const char *, const char *);
|
||||||
void deny_input_open(int, u_int32_t, void *);
|
void deny_input_open(int, u_int32_t, void *);
|
||||||
|
|
16
session.c
16
session.c
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.139 2002/06/23 20:39:45 deraadt Exp $");
|
RCSID("$OpenBSD: session.c,v 1.140 2002/06/23 21:06:41 deraadt Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -1970,9 +1970,9 @@ session_setup_x11fwd(Session *s)
|
||||||
debug("X11 display already set.");
|
debug("X11 display already set.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s->display_number = x11_create_display_inet(options.x11_display_offset,
|
if (x11_create_display_inet(options.x11_display_offset,
|
||||||
options.x11_use_localhost, s->single_connection);
|
options.x11_use_localhost, s->single_connection,
|
||||||
if (s->display_number == -1) {
|
&s->display_number) == -1) {
|
||||||
debug("x11_create_display_inet failed.");
|
debug("x11_create_display_inet failed.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1986,9 +1986,9 @@ session_setup_x11fwd(Session *s)
|
||||||
* different than the DISPLAY string for localhost displays.
|
* different than the DISPLAY string for localhost displays.
|
||||||
*/
|
*/
|
||||||
if (options.x11_use_localhost) {
|
if (options.x11_use_localhost) {
|
||||||
snprintf(display, sizeof display, "localhost:%d.%d",
|
snprintf(display, sizeof display, "localhost:%u.%u",
|
||||||
s->display_number, s->screen);
|
s->display_number, s->screen);
|
||||||
snprintf(auth_display, sizeof auth_display, "unix:%d.%d",
|
snprintf(auth_display, sizeof auth_display, "unix:%u.%u",
|
||||||
s->display_number, s->screen);
|
s->display_number, s->screen);
|
||||||
s->display = xstrdup(display);
|
s->display = xstrdup(display);
|
||||||
s->auth_display = xstrdup(auth_display);
|
s->auth_display = xstrdup(auth_display);
|
||||||
|
@ -2004,10 +2004,10 @@ session_setup_x11fwd(Session *s)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr));
|
memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr));
|
||||||
snprintf(display, sizeof display, "%.50s:%d.%d", inet_ntoa(my_addr),
|
snprintf(display, sizeof display, "%.50s:%u.%u", inet_ntoa(my_addr),
|
||||||
s->display_number, s->screen);
|
s->display_number, s->screen);
|
||||||
#else
|
#else
|
||||||
snprintf(display, sizeof display, "%.400s:%d.%d", hostname,
|
snprintf(display, sizeof display, "%.400s:%u.%u", hostname,
|
||||||
s->display_number, s->screen);
|
s->display_number, s->screen);
|
||||||
#endif
|
#endif
|
||||||
s->display = xstrdup(display);
|
s->display = xstrdup(display);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: session.h,v 1.17 2002/03/29 18:59:32 markus Exp $ */
|
/* $OpenBSD: session.h,v 1.18 2002/06/23 21:06:41 deraadt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
|
@ -37,15 +37,15 @@ struct Session {
|
||||||
/* tty */
|
/* tty */
|
||||||
char *term;
|
char *term;
|
||||||
int ptyfd, ttyfd, ptymaster;
|
int ptyfd, ttyfd, ptymaster;
|
||||||
int row, col, xpixel, ypixel;
|
u_int row, col, xpixel, ypixel;
|
||||||
char tty[TTYSZ];
|
char tty[TTYSZ];
|
||||||
/* last login */
|
/* last login */
|
||||||
char hostname[MAXHOSTNAMELEN];
|
char hostname[MAXHOSTNAMELEN];
|
||||||
time_t last_login_time;
|
time_t last_login_time;
|
||||||
/* X11 */
|
/* X11 */
|
||||||
int display_number;
|
u_int display_number;
|
||||||
char *display;
|
char *display;
|
||||||
int screen;
|
u_int screen;
|
||||||
char *auth_display;
|
char *auth_display;
|
||||||
char *auth_proto;
|
char *auth_proto;
|
||||||
char *auth_data;
|
char *auth_data;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче