Differences From Artifact [4cfef99ad1]:
- File unix/ux_x11.c — part of check-in [8eda1bb259] at 2008-11-17 12:38:09 on branch trunk — Revamp of the local X11 connection code. We now parse X display strings more rigorously, and then we look up the local X authority data in .Xauthority _ourself_ rather than delegating to an external xauth program. This is (negligibly) more efficient on Unix, assuming I haven't got it wrong in some subtle way, but its major benefit is that we can now support X authority lookups on Windows as well provided the user points us at an appropriate X authority file in the standard format. A new Windows-specific config option has been added for this purpose. (user: simon size: 1525)
To Artifact [25a181317d]:
- File unix/ux_x11.c — part of check-in [057f0b0fca] at 2009-01-04 19:01:58 on branch trunk — Cope with a (non-standard) ENAMETOOLONG return from gethostname(); glibc will do this if the supplied buffer isn't big enough, which shouldn't lead to complete abandonment of X11 auth. (Would only have bitten with hostnames >255 chars anyway.) (user: jacob size: 1575)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | + |
/*
* ux_x11.c: fetch local auth data for X forwarding.
*/
#include <ctype.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <errno.h>
#include "putty.h"
#include "ssh.h"
#include "network.h"
void platform_get_x11_auth(struct X11Display *disp, const Config *cfg)
{
|
| ︙ | |||
36 37 38 39 40 41 42 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + + |
int len;
sfree(disp->hostname);
len = 128;
do {
len *= 2;
disp->hostname = snewn(len, char);
|
| ︙ |