From 8859ad32d4f35e74d9c95eed081ff9655eb1c9b3 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Sat, 5 Apr 2008 12:26:49 +0000 Subject: [PATCH 1/5] Fix misleading parameter name. [originally from svn r7970] --- doc/man-pter.but | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man-pter.but b/doc/man-pter.but index 12da5921..df7b1728 100644 --- a/doc/man-pter.but +++ b/doc/man-pter.but @@ -40,7 +40,7 @@ option has a double minus sign, even though none of the others do. This is because this option is supplied automatically by GTK. Sorry.) -\dt \cw{\-name} \e{font-name} +\dt \cw{\-name} \e{name} \dd Specify the name under which \cw{pterm} looks up X resources. Normally it will look them up as (for example) \cw{pterm.Font}. If From 1d27dc5f95a2a5f1d85eb736af04c66d0a87df25 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 11 Apr 2008 13:28:38 +0000 Subject: [PATCH 2/5] Utterly hideous new approach to extracting install-sh from the autoconf/automake edifice, since my previous approach of guessing its pathname turns out not to work on at least one kind of system. [originally from svn r7984] --- mkauto.sh | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/mkauto.sh b/mkauto.sh index cdee6221..334a110b 100755 --- a/mkauto.sh +++ b/mkauto.sh @@ -3,6 +3,41 @@ # It's separate from mkfiles.pl because it won't work (and isn't needed) # on a non-Unix system. -# Track down automake's copy of install-sh -cp `aclocal --print-ac-dir | sed 's/aclocal$/automake/'`/install-sh unix/. -(cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache) +# Persuade automake to give us a copy of its install-sh. This is a +# pain because I don't actually want to have to _use_ automake. +# Instead, I construct a trivial unrelated automake project in a +# temporary subdirectory, run automake so that it'll copy +# install-sh into that directory, then copy it back out again. +# Hideous, but it should work. + +mkdir automake-grievous-hack +cat > automake-grievous-hack/hello.c << EOF +#include +int main(int argc, char **argv) +{ + printf("hello, world\n"); + return 0; +} +EOF +cat > automake-grievous-hack/Makefile.am << EOF +bin_PROGRAMS = hello +hello_SOURCES = hello.c +EOF +cat > automake-grievous-hack/configure.ac << EOF +AC_INIT +AM_INIT_AUTOMAKE(hello, 1.0) +AC_CONFIG_FILES([Makefile]) +AC_PROG_CC +AC_OUTPUT +EOF +echo Some news > automake-grievous-hack/NEWS +echo Some text > automake-grievous-hack/README +echo Some people > automake-grievous-hack/AUTHORS +echo Some changes > automake-grievous-hack/ChangeLog +rm -f install-sh # this won't work if we accidentally have one _here_ +(cd automake-grievous-hack && autoreconf -i && \ + cp install-sh ../unix/install-sh) +rm -rf automake-grievous-hack + +# That was the hard bit. Now run autoconf on our real configure.in. +(cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache) From dc2c57fc75de367f05ad238c56c7bf8e4f7244c2 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Sat, 26 Apr 2008 18:45:06 +0000 Subject: [PATCH 3/5] Mention Vista. [originally from svn r7993] --- doc/faq.but | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/faq.but b/doc/faq.but index 82214761..8ff888db 100644 --- a/doc/faq.but +++ b/doc/faq.but @@ -209,7 +209,7 @@ seems to be working so far. Currently, release versions of PuTTY tools only run on full Win32 systems and Unix. \q{Win32} includes Windows 95, 98, and ME, and it -includes Windows NT, Windows 2000 and Windows XP. +includes Windows NT, 2000, XP, and Vista. In the development code, a partial port to the Mac OS (see \k{faq-mac-port}) is under way. From b0dc24a77931bc8dc8562fb3c527868f3275f8b6 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 21 May 2008 09:48:40 +0000 Subject: [PATCH 4/5] Update the FAQ to state more explicitly that PuTTY contains no OpenSSL code. [originally from svn r8004] --- doc/faq.but | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/faq.but b/doc/faq.but index 8ff888db..9c85deb8 100644 --- a/doc/faq.but +++ b/doc/faq.but @@ -1398,11 +1398,12 @@ and pay any costs, we can't provide this. \H{faq-misc} Miscellaneous questions \S{faq-openssh}{Question} Is PuTTY a port of \i{OpenSSH}, or based on -OpenSSH? +OpenSSH or OpenSSL? No, it isn't. PuTTY is almost completely composed of code written from scratch for PuTTY. The only code we share with OpenSSH is the -detector for SSH-1 CRC compensation attacks, written by CORE SDI S.A. +detector for SSH-1 CRC compensation attacks, written by CORE SDI +S.A; we share no code at all with OpenSSL. \S{faq-sillyputty}{Question} Where can I buy silly putty? From 14d825d42fb4d36f671ea4d05c6d254f7796c7e5 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 28 May 2008 19:23:57 +0000 Subject: [PATCH 5/5] OS X Leopard, it turns out, has a new and exciting strategy for addressing X displays. Update PuTTY's display-name-to-Unix-socket- path translation code to cope with it, thus causing X forwarding to start working again on Leopard. [originally from svn r8020] --- mac/macnet.c | 3 ++- ssh.h | 3 ++- unix/uxnet.c | 20 +++++++++++++++++--- windows/winnet.c | 3 ++- x11fwd.c | 4 ++-- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/mac/macnet.c b/mac/macnet.c index 2ed0069b..fc022dc7 100644 --- a/mac/macnet.c +++ b/mac/macnet.c @@ -175,7 +175,8 @@ int net_service_lookup(char *service) return 0; } -SockAddr platform_get_x11_unix_address(int displaynum, char **canonicalname) +SockAddr platform_get_x11_unix_address(const char *display, int displaynum, + char **canonicalname) { return NULL; } diff --git a/ssh.h b/ssh.h index 30311412..1bc7a98f 100644 --- a/ssh.h +++ b/ssh.h @@ -344,7 +344,8 @@ extern void platform_get_x11_auth(char *display, int *proto, unsigned char *data, int *datalen); extern const char platform_x11_best_transport[]; /* best X11 hostname for this platform if none specified */ -SockAddr platform_get_x11_unix_address(int displaynum, char **canonicalname); +SockAddr platform_get_x11_unix_address(const char *display, int displaynum, + char **canonicalname); /* make up a SockAddr naming the address for displaynum */ char *platform_get_x_display(void); /* allocated local X display string, if any */ diff --git a/unix/uxnet.c b/unix/uxnet.c index bd40937a..c082567d 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -1292,15 +1292,29 @@ int net_service_lookup(char *service) return 0; } -SockAddr platform_get_x11_unix_address(int displaynum, char **canonicalname) +SockAddr platform_get_x11_unix_address(const char *display, int displaynum, + char **canonicalname) { SockAddr ret = snew(struct SockAddr_tag); int n; memset(ret, 0, sizeof *ret); ret->family = AF_UNIX; - n = snprintf(ret->hostname, sizeof ret->hostname, - "%s%d", X11_UNIX_PATH, displaynum); + /* + * Mac OS X Leopard uses an innovative X display naming + * convention in which the entire display name is the path to + * the Unix socket, including the trailing :0 which only + * _looks_ like a display number. Heuristically, I think + * detecting this by means of a leading slash ought to be + * adequate. + */ + if (display[0] == '/') { + n = snprintf(ret->hostname, sizeof ret->hostname, + "%s", display); + } else { + n = snprintf(ret->hostname, sizeof ret->hostname, + "%s%d", X11_UNIX_PATH, displaynum); + } if(n < 0) ret->error = "snprintf failed"; else if(n >= sizeof ret->hostname) diff --git a/windows/winnet.c b/windows/winnet.c index 19babb0f..89d2f474 100644 --- a/windows/winnet.c +++ b/windows/winnet.c @@ -1637,7 +1637,8 @@ int net_service_lookup(char *service) return 0; } -SockAddr platform_get_x11_unix_address(int displaynum, char **canonicalname) +SockAddr platform_get_x11_unix_address(const char *display, int displaynum, + char **canonicalname) { SockAddr ret = snew(struct SockAddr_tag); memset(ret, 0, sizeof(struct SockAddr_tag)); diff --git a/x11fwd.c b/x11fwd.c index 139cb775..4621ac9b 100644 --- a/x11fwd.c +++ b/x11fwd.c @@ -301,9 +301,9 @@ const char *x11_init(Socket * s, char *display, void *c, void *auth, host[n] = '\0'; sfree(display); - if(!strcmp(host, "unix")) { + if(!strcmp(host, "unix") || host[0] == '/') { /* use AF_UNIX sockets (doesn't make sense on all platforms) */ - addr = platform_get_x11_unix_address(displaynum, + addr = platform_get_x11_unix_address(display, displaynum, &dummy_realhost); port = 0; /* to show we are not confused */ } else {