X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fux_x11.c;h=63a92b5858bb39f671d3f36a99d08b7095ae5c11;hb=2718165f013bde5811ec37022fb5bfbdbb984895;hp=5794d315e3b6baad4e6867427421d181acf939d1;hpb=51bceb0c9ae16dda950429a3f7c71654c885c176;p=PuTTY.git diff --git a/unix/ux_x11.c b/unix/ux_x11.c index 5794d315..63a92b58 100644 --- a/unix/ux_x11.c +++ b/unix/ux_x11.c @@ -12,45 +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); - disp->hostname = NULL; - len = 128; - do { - len *= 2; - disp->hostname = sresize(disp->hostname, len, char); - if ((gethostname(disp->hostname, len) < 0) && - (errno != ENAMETOOLONG)) { - sfree(disp->hostname); - disp->hostname = NULL; - return; - } - } while (strlen(disp->hostname) >= len-1); - } - /* * Find the .Xauthority file. */