X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fux_x11.c;h=63a92b5858bb39f671d3f36a99d08b7095ae5c11;hb=89da2ddf564a93414ee9ab2df3f053608094e417;hp=4126d5b7493e1471645376bd62601919191e59c1;hpb=030046a2a81213921d9ad61b102f63343a9a4e57;p=PuTTY.git diff --git a/unix/ux_x11.c b/unix/ux_x11.c index 4126d5b7..63a92b58 100644 --- a/unix/ux_x11.c +++ b/unix/ux_x11.c @@ -12,43 +12,11 @@ #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) && - (errno != ENAMETOOLONG)) { - disp->hostname = NULL; - return; - } - } while (strlen(disp->hostname) >= len-1); - } - /* * Find the .Xauthority file. */