Add patch from MacPorts to fix X11 forwarding under Mac OS X Yosemite.diff -r1.227 -r1.228 pkgsrc/security/openssh/Makefile
(tron)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.227 2015/02/16 11:03:20 jperkin Exp $ | 1 | # $NetBSD: Makefile,v 1.228 2015/03/19 20:23:55 tron Exp $ | |
2 | 2 | |||
3 | DISTNAME= openssh-6.6p1 | 3 | DISTNAME= openssh-6.6p1 | |
4 | PKGNAME= openssh-6.6.1 | 4 | PKGNAME= openssh-6.6.1 | |
5 | PKGREVISION= 4 | 5 | PKGREVISION= 5 | |
6 | CATEGORIES= security | 6 | CATEGORIES= security | |
7 | MASTER_SITES= ${MASTER_SITE_OPENBSD:=OpenSSH/portable/} | 7 | MASTER_SITES= ${MASTER_SITE_OPENBSD:=OpenSSH/portable/} | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.openssh.com/ | 10 | HOMEPAGE= http://www.openssh.com/ | |
11 | COMMENT= Open Source Secure shell client and server (remote login program) | 11 | COMMENT= Open Source Secure shell client and server (remote login program) | |
12 | 12 | |||
13 | CONFLICTS= sftp-[0-9]* | 13 | CONFLICTS= sftp-[0-9]* | |
14 | CONFLICTS+= ssh-[0-9]* ssh6-[0-9]* | 14 | CONFLICTS+= ssh-[0-9]* ssh6-[0-9]* | |
15 | CONFLICTS+= ssh2-[0-9]* ssh2-nox11-[0-9]* | 15 | CONFLICTS+= ssh2-[0-9]* ssh2-nox11-[0-9]* | |
16 | CONFLICTS+= openssh+gssapi-[0-9]* | 16 | CONFLICTS+= openssh+gssapi-[0-9]* | |
17 | CONFLICTS+= lsh>2.0 | 17 | CONFLICTS+= lsh>2.0 | |
18 | 18 |
@@ -1,27 +1,26 @@ | @@ -1,27 +1,26 @@ | |||
1 | $NetBSD: distinfo,v 1.87 2014/10/08 15:50:22 taca Exp $ | 1 | $NetBSD: distinfo,v 1.88 2015/03/19 20:23:55 tron Exp $ | |
2 | 2 | |||
3 | SHA1 (openssh-6.6p1-hpnssh14v4.diff.gz) = 1cb86c7151ea4c805cfb1197eac13844cd8f2f2c | |||
4 | RMD160 (openssh-6.6p1-hpnssh14v4.diff.gz) = 292cea7880ff66040d915f2d5957dd27d0835984 | |||
5 | Size (openssh-6.6p1-hpnssh14v4.diff.gz) = 23417 bytes | |||
6 | SHA1 (openssh-6.6p1.tar.gz) = b850fd1af704942d9b3c2eff7ef6b3a59b6a6b6e | 3 | SHA1 (openssh-6.6p1.tar.gz) = b850fd1af704942d9b3c2eff7ef6b3a59b6a6b6e | |
7 | RMD160 (openssh-6.6p1.tar.gz) = e19ed34e240001898b6665bb4356b868bba5513d | 4 | RMD160 (openssh-6.6p1.tar.gz) = e19ed34e240001898b6665bb4356b868bba5513d | |
8 | Size (openssh-6.6p1.tar.gz) = 1282502 bytes | 5 | Size (openssh-6.6p1.tar.gz) = 1282502 bytes | |
9 | SHA1 (patch-Makefile.in) = 3b136be23e0dab21894dcc881746cf5a186ff572 | 6 | SHA1 (patch-Makefile.in) = 3b136be23e0dab21894dcc881746cf5a186ff572 | |
10 | SHA1 (patch-auth-passwd.c) = de9f5487fe1f5848cc702e549bce949fd75d70cd | 7 | SHA1 (patch-auth-passwd.c) = de9f5487fe1f5848cc702e549bce949fd75d70cd | |
11 | SHA1 (patch-auth-rhosts.c) = ab8dd3e375accc5bed3e15b158a85a1b1f9a2e3e | 8 | SHA1 (patch-auth-rhosts.c) = ab8dd3e375accc5bed3e15b158a85a1b1f9a2e3e | |
12 | SHA1 (patch-auth.c) = 950b0380bcbb0fa1681014cfbb41528d09a10a18 | 9 | SHA1 (patch-auth.c) = 950b0380bcbb0fa1681014cfbb41528d09a10a18 | |
13 | SHA1 (patch-auth1.c) = 7b0481f445bc85cce9d7539b00bf581b9aa09fea | 10 | SHA1 (patch-auth1.c) = 7b0481f445bc85cce9d7539b00bf581b9aa09fea | |
14 | SHA1 (patch-auth2.c) = 8f4f97516874fc4af5814cbd3a1f59b9ca77b43f | 11 | SHA1 (patch-auth2.c) = 8f4f97516874fc4af5814cbd3a1f59b9ca77b43f | |
12 | SHA1 (patch-channels.c) = 88af4136f13f93d73c70caacea0a2ded0601d1cf | |||
13 | SHA1 (patch-clientloop.c) = 499f34ce4e067f1da8aca257cfa7dd820efa3504 | |||
15 | SHA1 (patch-config.h.in) = 9799f48f204aa213318914f1d6c45e83a8af942f | 14 | SHA1 (patch-config.h.in) = 9799f48f204aa213318914f1d6c45e83a8af942f | |
16 | SHA1 (patch-configure) = 3015dda57a5626667cf5c15c7c7be25f8844cfc6 | 15 | SHA1 (patch-configure) = 3015dda57a5626667cf5c15c7c7be25f8844cfc6 | |
17 | SHA1 (patch-configure.ac) = 996a3bcf133a0832b9d7fa35cc0983562d9fa60a | 16 | SHA1 (patch-configure.ac) = 996a3bcf133a0832b9d7fa35cc0983562d9fa60a | |
18 | SHA1 (patch-defines.h) = 4f4f4c8dc54aa86275192edf230b36737b1c0cf6 | 17 | SHA1 (patch-defines.h) = 4f4f4c8dc54aa86275192edf230b36737b1c0cf6 | |
19 | SHA1 (patch-includes.h) = 0a899d3b38ef3de7f5b08fec022696b4e998b54e | 18 | SHA1 (patch-includes.h) = 0a899d3b38ef3de7f5b08fec022696b4e998b54e | |
20 | SHA1 (patch-loginrec.c) = 3b42ea96935a69316233eb2c65d810e46a3e5d76 | 19 | SHA1 (patch-loginrec.c) = 3b42ea96935a69316233eb2c65d810e46a3e5d76 | |
21 | SHA1 (patch-openbsd-compat_bsd-openpty.c) = a1318cf691f0ad844a8761a77e3bb32a9e20c695 | 20 | SHA1 (patch-openbsd-compat_bsd-openpty.c) = a1318cf691f0ad844a8761a77e3bb32a9e20c695 | |
22 | SHA1 (patch-openbsd-compat_openbsd-compat.h) = 1cafbe8f226c16443d2cfd003166923f33352eb0 | 21 | SHA1 (patch-openbsd-compat_openbsd-compat.h) = 1cafbe8f226c16443d2cfd003166923f33352eb0 | |
23 | SHA1 (patch-openbsd-compat_port-tun.c) = 8288e2b9336ea1fcc1129d8a2ab5e55816b2ccbf | 22 | SHA1 (patch-openbsd-compat_port-tun.c) = 8288e2b9336ea1fcc1129d8a2ab5e55816b2ccbf | |
24 | SHA1 (patch-platform.c) = c2f85f494f0a38ed9fea93c46c98b20d865610a0 | 23 | SHA1 (patch-platform.c) = c2f85f494f0a38ed9fea93c46c98b20d865610a0 | |
25 | SHA1 (patch-scp.c) = 97e33843cc1b93babb6c45225c07ac74555e6d54 | 24 | SHA1 (patch-scp.c) = 97e33843cc1b93babb6c45225c07ac74555e6d54 | |
26 | SHA1 (patch-session.c) = 55e84175c7294816107c970f002401d1766f7095 | 25 | SHA1 (patch-session.c) = 55e84175c7294816107c970f002401d1766f7095 | |
27 | SHA1 (patch-sftp-common.c) = 5b36300c6a83ceef2340c2cee3be211eaf39ecdd | 26 | SHA1 (patch-sftp-common.c) = 5b36300c6a83ceef2340c2cee3be211eaf39ecdd |
$NetBSD: patch-channels.c,v 1.1 2015/03/19 20:23:55 tron Exp $
Fix X11 forwarding under Mac OS X Yosemite. Patch taken from MacPorts.
https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?rev=121205
--- channels.c.orig 2014-02-26 23:18:33.000000000 +0000
+++ channels.c 2015-03-19 20:16:04.000000000 +0000
@@ -3576,15 +3576,35 @@
* connection to the real X server.
*/
- /* Check if the display is from launchd. */
#ifdef __APPLE__
- if (strncmp(display, "/tmp/launch", 11) == 0) {
- sock = connect_local_xsocket_path(display);
- if (sock < 0)
- return -1;
+ /* Check if the display is a path to a socket (as set by launchd). */
+ {
+ char path[PATH_MAX];
+ struct stat sbuf;
+ int is_path_to_socket = 0;
+
+ strlcpy(path, display, sizeof(path));
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ } else {
+ char *dot = strrchr(path, '.');
+ if (dot) {
+ *dot = '\0';
+ /* screen = atoi(dot + 1); */
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket=1;
+ }
+ }
+ }
- /* OK, we now have a connection to the display. */
- return sock;
+ if (is_path_to_socket) {
+ sock = connect_local_xsocket_path(path);
+ if (sock < 0)
+ return -1;
+
+ /* OK, we now have a connection to the display. */
+ return sock;
+ }
}
#endif
/*
$NetBSD: patch-clientloop.c,v 1.1 2015/03/19 20:23:55 tron Exp $
Fix X11 forwarding under Mac OS X Yosemite. Patch taken from MacPorts.
https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?rev=121205
--- clientloop.c.orig 2014-02-04 00:20:15.000000000 +0000
+++ clientloop.c 2015-03-19 20:16:04.000000000 +0000
@@ -313,6 +313,10 @@
struct stat st;
u_int now;
+#if __APPLE__
+ int is_path_to_socket = 0;
+#endif /* __APPLE__ */
+
xauthdir = xauthfile = NULL;
*_proto = proto;
*_data = data;
@@ -328,6 +332,33 @@
debug("x11_get_proto: DISPLAY not set");
return;
}
+#if __APPLE__
+ {
+ /*
+ * If using launchd socket, remove the screen number from the end
+ * of $DISPLAY. is_path_to_socket is used later in this function
+ * to determine if an error should be displayed.
+ */
+ char path[PATH_MAX];
+ struct stat sbuf;
+
+ strlcpy(path, display, sizeof(path));
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ } else {
+ char *dot = strrchr(path, '.');
+ if (dot) {
+ *dot = '\0';
+ /* screen = atoi(dot + 1); */
+ if (0 == stat(path, &sbuf)) {
+ is_path_to_socket = 1;
+ debug("x11_get_proto: $DISPLAY is launchd, removing screennum");
+ setenv("DISPLAY", path, 1);
+ }
+ }
+ }
+ }
+#endif /* __APPLE__ */
/*
* Handle FamilyLocal case where $DISPLAY does
* not match an authorization entry. For this we
@@ -407,6 +438,9 @@
if (!got_data) {
u_int32_t rnd = 0;
+#if __APPLE__
+ if (!is_path_to_socket)
+#endif /* __APPLE__ */
logit("Warning: No xauth data; "
"using fake authentication data for X11 forwarding.");
strlcpy(proto, SSH_X11_PROTO, sizeof proto);