Bugzilla – Attachment 1414 Details for
Bug 1418
Issues with X11 forwarding on Mac OS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes X11 forwarding on Mac OS X.
DVG-5142987_launchd_DISPLAY_for_X11.patch (text/plain), 1.45 KB, created by
Disco Vince Giffin
on 2007-12-21 15:42:11 AEDT
(
hide
)
Description:
Fixes X11 forwarding on Mac OS X.
Filename:
MIME Type:
Creator:
Disco Vince Giffin
Created:
2007-12-21 15:42:11 AEDT
Size:
1.45 KB
patch
obsolete
>diff -uNr ../openssh-4.5p1.orig/channels.c ./channels.c >--- ../openssh-4.5p1.orig/channels.c 2006-08-29 18:07:40.000000000 -0700 >+++ ./channels.c 2007-04-19 18:59:28.000000000 -0700 >@@ -2954,7 +2954,7 @@ > } > > static int >-connect_local_xsocket(u_int dnr) >+connect_local_xsocket_path(const char *pathname) > { > int sock; > struct sockaddr_un addr; >@@ -2964,7 +2964,7 @@ > error("socket: %.100s", strerror(errno)); > memset(&addr, 0, sizeof(addr)); > addr.sun_family = AF_UNIX; >- snprintf(addr.sun_path, sizeof addr.sun_path, _PATH_UNIX_X, dnr); >+ strlcpy(addr.sun_path, pathname, sizeof addr.sun_path); > if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) > return sock; > close(sock); >@@ -2972,6 +2972,14 @@ > return -1; > } > >+static int >+connect_local_xsocket(u_int dnr) >+{ >+ char buf[1024]; >+ snprintf(buf, sizeof buf, _PATH_UNIX_X, dnr); >+ return connect_local_xsocket_path(buf); >+} >+ > int > x11_connect_display(void) > { >@@ -2994,9 +3002,18 @@ > */ > > /* >+ * Check if the display is from launchd, then... > * Check if it is a unix domain socket. Unix domain displays are in > * one of the following formats: unix:d[.s], :d[.s], ::d[.s] > */ >+ if (strncmp(display, "/tmp/launch", 11) == 0) { >+ sock = connect_local_xsocket_path(display); >+ if (sock < 0) >+ return -1; >+ >+ /* OK, we now have a connection to the display. */ >+ return sock; >+ } > if (strncmp(display, "unix:", 5) == 0 || > display[0] == ':') { > /* Connect to the unix domain socket. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1418
: 1414