X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8def70c3ec6f81f95673c0de67a75b5a6b2e9e1c..HEAD:/unix/ux_x11.c diff --git a/unix/ux_x11.c b/unix/ux_x11.c index 0998069e..63a92b58 100644 --- a/unix/ux_x11.c +++ b/unix/ux_x11.c @@ -6,48 +6,18 @@ #include #include #include +#include #include "putty.h" #include "ssh.h" #include "network.h" -void platform_get_x11_auth(struct X11Display *disp, const Config *cfg) +void platform_get_x11_auth(struct X11Display *disp, Conf *conf) { char *xauthfile; int needs_free; /* - * Upgrade an IP-style localhost display to a Unix-socket - * display. - */ - if (!disp->unixdomain && sk_address_is_local(disp->addr)) { - sk_addr_free(disp->addr); - disp->unixdomain = TRUE; - disp->addr = platform_get_x11_unix_address(NULL, disp->displaynum); - disp->realhost = dupprintf("unix:%d", disp->displaynum); - disp->port = 0; - } - - /* - * Set the hostname for Unix-socket displays, so that we'll - * look it up correctly in the X authority file. - */ - if (disp->unixdomain) { - int len; - - sfree(disp->hostname); - len = 128; - do { - len *= 2; - disp->hostname = snewn(len, char); - if (gethostname(disp->hostname, len) < 0) { - disp->hostname = NULL; - return; - } - } while (strlen(disp->hostname) >= len-1); - } - - /* * Find the .Xauthority file. */ needs_free = FALSE;