diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.139 2002/06/23 20:39:45 deraadt Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.140 2002/06/23 21:06:41 deraadt Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1970,9 +1970,9 @@ session_setup_x11fwd(Session *s) | |||
1970 | debug("X11 display already set."); | 1970 | debug("X11 display already set."); |
1971 | return 0; | 1971 | return 0; |
1972 | } | 1972 | } |
1973 | s->display_number = x11_create_display_inet(options.x11_display_offset, | 1973 | if (x11_create_display_inet(options.x11_display_offset, |
1974 | options.x11_use_localhost, s->single_connection); | 1974 | options.x11_use_localhost, s->single_connection, |
1975 | if (s->display_number == -1) { | 1975 | &s->display_number) == -1) { |
1976 | debug("x11_create_display_inet failed."); | 1976 | debug("x11_create_display_inet failed."); |
1977 | return 0; | 1977 | return 0; |
1978 | } | 1978 | } |
@@ -1986,9 +1986,9 @@ session_setup_x11fwd(Session *s) | |||
1986 | * different than the DISPLAY string for localhost displays. | 1986 | * different than the DISPLAY string for localhost displays. |
1987 | */ | 1987 | */ |
1988 | if (options.x11_use_localhost) { | 1988 | if (options.x11_use_localhost) { |
1989 | snprintf(display, sizeof display, "localhost:%d.%d", | 1989 | snprintf(display, sizeof display, "localhost:%u.%u", |
1990 | s->display_number, s->screen); | 1990 | s->display_number, s->screen); |
1991 | snprintf(auth_display, sizeof auth_display, "unix:%d.%d", | 1991 | snprintf(auth_display, sizeof auth_display, "unix:%u.%u", |
1992 | s->display_number, s->screen); | 1992 | s->display_number, s->screen); |
1993 | s->display = xstrdup(display); | 1993 | s->display = xstrdup(display); |
1994 | s->auth_display = xstrdup(auth_display); | 1994 | s->auth_display = xstrdup(auth_display); |
@@ -2004,10 +2004,10 @@ session_setup_x11fwd(Session *s) | |||
2004 | return 0; | 2004 | return 0; |
2005 | } | 2005 | } |
2006 | memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); | 2006 | memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); |
2007 | snprintf(display, sizeof display, "%.50s:%d.%d", inet_ntoa(my_addr), | 2007 | snprintf(display, sizeof display, "%.50s:%u.%u", inet_ntoa(my_addr), |
2008 | s->display_number, s->screen); | 2008 | s->display_number, s->screen); |
2009 | #else | 2009 | #else |
2010 | snprintf(display, sizeof display, "%.400s:%d.%d", hostname, | 2010 | snprintf(display, sizeof display, "%.400s:%u.%u", hostname, |
2011 | s->display_number, s->screen); | 2011 | s->display_number, s->screen); |
2012 | #endif | 2012 | #endif |
2013 | s->display = xstrdup(display); | 2013 | s->display = xstrdup(display); |