X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fux_x11.c;h=63a92b5858bb39f671d3f36a99d08b7095ae5c11;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=0998069e46c2089cab356259485c6b9a0a6c893a;hpb=ca6fc3a4daf51166a15693feffc967bee9e3f59a;p=PuTTY.git 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,47 +6,17 @@ #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. */