diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-23 21:06:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-23 21:06:42 +0000 |
commit | ae464ffd04effd58d5eedb74ca34fcfb14661708 (patch) | |
tree | 398d16cd9acd0861ab3909d05d98af6d48de08c7 /usr.bin | |
parent | da2b3de50d23632631b38c84f66a885ac0c9d048 (diff) |
display, screen, row, col, xpixel, ypixel are u_int; markus ok
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/channels.c | 11 | ||||
-rw-r--r-- | usr.bin/ssh/channels.h | 4 | ||||
-rw-r--r-- | usr.bin/ssh/session.c | 14 | ||||
-rw-r--r-- | usr.bin/ssh/session.h | 8 |
4 files changed, 19 insertions, 18 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index a1b230591b0..07e32c0cdc2 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -39,7 +39,7 @@ */ #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 "ssh1.h" @@ -2322,12 +2322,12 @@ channel_connect_to(const char *host, u_short port) /* * Creates an internet domain socket for listening for X11 connections. - * Returns a suitable display number for the DISPLAY variable, or -1 if - * an error occurs. + * Returns 0 and a suitable display number for the DISPLAY variable + * stored in display_numberp , or -1 if an error occurs. */ int 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; int display_number, sock; @@ -2399,7 +2399,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost, } /* Return the display number for the DISPLAY environment variable. */ - return display_number; + *display_numberp = display_number; + return (0); } static int diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index 9ceff3e7319..64f6c41fa69 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -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> @@ -205,7 +205,7 @@ int channel_setup_remote_fwd_listener(const char *, u_short, int); /* x11 forwarding */ 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_request_forwarding_with_spoofing(int, const char *, const char *); void deny_input_open(int, u_int32_t, void *); diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index a54166ba496..58eafa76658 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #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 "ssh1.h" @@ -1770,9 +1770,9 @@ session_setup_x11fwd(Session *s) debug("X11 display already set."); return 0; } - s->display_number = x11_create_display_inet(options.x11_display_offset, - options.x11_use_localhost, s->single_connection); - if (s->display_number == -1) { + if (x11_create_display_inet(options.x11_display_offset, + options.x11_use_localhost, s->single_connection, + &s->display_number) == -1) { debug("x11_create_display_inet failed."); return 0; } @@ -1786,14 +1786,14 @@ session_setup_x11fwd(Session *s) * different than the DISPLAY string for localhost displays. */ if (options.x11_use_localhost) { - snprintf(display, sizeof display, "localhost:%d.%d", + snprintf(display, sizeof display, "localhost:%u.%u", 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 = xstrdup(display); s->auth_display = xstrdup(auth_display); } else { - snprintf(display, sizeof display, "%.400s:%d.%d", hostname, + snprintf(display, sizeof display, "%.400s:%u.%u", hostname, s->display_number, s->screen); s->display = xstrdup(display); s->auth_display = xstrdup(display); diff --git a/usr.bin/ssh/session.h b/usr.bin/ssh/session.h index 2a7e4b224fd..3bce97891fd 100644 --- a/usr.bin/ssh/session.h +++ b/usr.bin/ssh/session.h @@ -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. @@ -37,15 +37,15 @@ struct Session { /* tty */ char *term; int ptyfd, ttyfd, ptymaster; - int row, col, xpixel, ypixel; + u_int row, col, xpixel, ypixel; char tty[TTYSZ]; /* last login */ char hostname[MAXHOSTNAMELEN]; time_t last_login_time; /* X11 */ - int display_number; + u_int display_number; char *display; - int screen; + u_int screen; char *auth_display; char *auth_proto; char *auth_data; |