r8305 seems to have made Unix PuTTY rather over-keen on Unix-domain sockets;
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Jan 2009 23:28:25 +0000 (23:28 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@8381 cda61777-01e9-0310-a592-d414129be87e

x11fwd.c

index 50300ad..1fd4e19 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");