]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
r8305 seems to have made Unix PuTTY rather over-keen on Unix-domain sockets;
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 4 Jan 2009 23:28:25 +0000 (23:28 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 4 Jan 2009 23:28:25 +0000 (23:28 +0000)
unless a protocol is explicitly specified with "tcp/foovax:0", it assume a
Unix-domain socket, thus not allowing a remote display on a machine other than
the client.

[originally from svn r8381]
[r8305 == ca6fc3a4daf51166a15693feffc967bee9e3f59a]

x11fwd.c

index 50300ad195121ddf244596cefcbaa30aca74ed90..1fd4e19085de97f58d6b636275337d853fcc10a5 100644 (file)
--- a/x11fwd.c
+++ b/x11fwd.c
@@ -125,8 +125,10 @@ struct X11Display *x11_setup_display(char *display, int authtype,
        if (protocol)
            disp->unixdomain = (!strcmp(protocol, "local") ||
                                !strcmp(protocol, "unix"));
-       else
+       else if (!*hostname || !strcmp(hostname, "unix"))
            disp->unixdomain = platform_uses_x11_unix_by_default;
+       else
+           disp->unixdomain = FALSE;
 
        if (!disp->hostname && !disp->unixdomain)
            disp->hostname = dupstr("localhost");