Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

56 check-ins using file config.c version 393f24e675

2009-05-11
13:48
Add a 'unix' Makefile type, for building the non-GUI parts of the PuTTY suite on non-GTK-enabled build platforms. check-in: b60c3e56cd user: simon tags: trunk
03:46
Pango-based font handling: combine display of adjacent characters into a single gdk_draw_layout() where conveniently feasible, after some work with xtrace revealed this as a major source of pterm's slow display updates when using client-side fonts. Ideally we ought to be able to do better. I know exactly what sequence of X protocol operations I want to see on the wire, but I don't know how to persuade Pango to generate them. check-in: e576c2c032 user: simon tags: trunk
2009-04-26
18:44
Ansgar Wiechers points out that known_hosts (at least OpenSSH's) has grown a means of specifying port numbers, so we should support that. check-in: dec77ca0b0 user: jacob tags: trunk
18:03
Discard hashed hostnames from input. check-in: 518f117cbb user: jacob tags: trunk
17:32
Reported by Tim Kosse: on Unix, read_random_seed() wasn't correctly checking the return from open() and behaved wrongly in the absence of a seed file. check-in: 5c8bb6b262 user: jacob tags: trunk
17:19
Several people have spotted an uninitialised structure member leading to a potential crash on "reget" in Unix PSFTP. check-in: 62f89992d5 user: jacob tags: trunk
2009-04-24
13:45
Richard Clark points out a missing check for ssh->mainchan being NULL. check-in: fbeba1f90f user: simon tags: trunk
2009-04-23
12:39
When giving authorisation errors from the proxy code in x11fwd.c, name the proxy using the global 'appname' variable, instead of statically calling it PuTTY. (Knock-on effect is that PSCP and PSFTP have to declare that variable, though of course they shouldn't ever actually _use_ the X forwarding code. Probably I ought to replace it with a stub nox11fwd.c for those applications.) check-in: 39f0cd437b user: simon tags: trunk
12:33
When starting a SOCKS connection in dynamic forwarding, freeze the local socket _before_ calling the SSH setup functions. This makes no difference to ssh.c itself, but it makes portfwd.c easier to reuse for other purposes (e.g. as a component of a standalone SOCKS server), because now ssh_send_port_open() can itself call pfd_confirm() without the freeze and unfreeze happening in the wrong order. check-in: 08ea874aac user: simon tags: trunk
2009-03-24
17:24
Support in the cross-platform code for translating to and from UTF-16 when exchanging wchar_t strings with the front end. Enabled by a #define in the platform's header file (one should not promiscuously translate UTF-16 surrogate pairs on 32-bit wchar_t platforms since that could give rise to redundant encoding attacks), which is present on Windows. check-in: 40cc1bcada user: simon tags: trunk
2009-03-03
13:57
Fix cosmetic keyboard-interactive issue: at the end of a normal k-i session, some servers (Debian in particular seems prone to this) send a k-i packet with no prompts and nothing to display. We were printing an extra "Using keyboard-interactive authentication" message in this case. (Introduced by me in r8172, I think.) check-in: 2229b9d9c3 user: jacob tags: trunk
12:35
Handle more gracefully the possibility of a keyboard-interactive prompts packet containing no actual prompts (perhaps due to odd server organisation, or perhaps so it can print a banner message and do nothing else). Previously, the get_userpass_input functions always returned failure when in '-batch' mode, even in this case where no actual input would be required. check-in: 628ac4afae user: simon tags: trunk
2009-02-28
17:04
Stop using physical tabs in Python. (I was goaded into doing this by my editor, which has defaulted to showing them as explicit ^I for a while now, but it seems like a generally prudent idea in any case.) check-in: 0a7aa358d3 user: simon tags: trunk
10:52
Debian bug #517535: we were unconditionally interpreting the 'string' field in a GdkEventKey structure as ISO-8859-1, which was correct for GTK 1.2 but in 2.0 that field is encoded according to the current C library locale. Hence, we now process that field by converting it to UTF-8 via trips through both libc and libcharset, and then let lpage_send() convert from UTF-8 back to whatever it's supposed to actually go down the line in. check-in: d5f3c90afa user: simon tags: trunk
2009-02-24
16:56
Fix inaccurate error message. check-in: cfd96a2662 user: jacob tags: trunk
2009-02-23
19:01
Since r8305, Unix PuTTY has always "upgraded" an X11 display like "localhost:0" to a Unix-domain socket. This typically works fine when PuTTY is run on the same machine as the X server, but it's broken multi-hop X forwarding through OpenSSH; when OpenSSH creates a proxy X server "localhost:10", it only listens on TCP, not on a Unix-domain socket. Instead, when deciding on the details of the display, we actively probe to see if there's a Unix-domain socket we can use instead, and only use it if it's there, falling back to the specified IP "localhost" if not. Independently, when looking for local auth details in Xauthority for a "localhost" TCP display, we prefer a matching Unix-domain entry, but will fall back to an IP "localhost" entry (which would be unusual, but we don't trust a Windows X server not to do it) -- this is a generalisation of the special case added in r2538 (but removed in r8305, as the automatic upgrade masked the need for it). (This is now done in platform-independent code, so a side-effect is that get_hostname() is now part of the networking abstraction on all platforms.) check-in: d5c507e1ed user: jacob tags: trunk
16:40
Stop attempting to make session logs private on Unix. This was introduced in r7084 at the same time as sensible permissions when writing private key files; however, it causes an assertion failure whenever an attempt is made to append to an existing log file on Unix, and it's not clear what "is_private" *should* do for append, so revert to log file security being the user's responsibility. (Fixes Ubuntu LP#212711.) check-in: 6b722846ee user: jacob tags: trunk
2009-02-03
15:22
The Windows config option to point at an X authority file is only read at connection setup time, so don't offer it in the Change Settings dialog box. (In particular, this fixes an assertion failure when selecting Change Settings on a non-SSH connection, since wincfg.c would have added that control to Connection/SSH/X11 when the parent panel Connection/SSH didn't exist. Making the control conditional on the selected protocol would have been sufficient to fix that failure, but I now realise that the setting should never have been presented in mid-session in any case.) check-in: 505eceb938 user: simon tags: trunk
2009-01-21
12:47
Don't call ReleaseCapture() on any mouse-button-up event. Instead, only call it when the _last_ mouse button comes back up. Otherwise, xterm mouse tracking will lose a button-up event if you press down two buttons, move the mouse outside the window, then release them one at a time. check-in: e7cab95225 user: simon tags: trunk
2009-01-13
12:18
Check the two popen() calls in noise_get_heavy for NULL. check-in: 2d54705a73 user: simon tags: trunk
2009-01-12
14:41
Patch from Gert-Jan Vons: create an event handle to go in the OVERLAPPED structure in output threads, as we already do for input threads. This apparently sorts out a hanging issue with serial ports when trying to do simultaneous read and write, because (GJV says, and it sounds plausible to me) in the absence of that event object Windows signals the file handle itself to notify GetOverlappedResult that it can return - and since the file handle might be being signalled by a read operation instead, that leads to ambiguity. Using an explicit event object in both directions means Windows always knows which way the data is going. Also a trivial fix in handle_output_new(), which was referencing the wrong element of a union due to a copy and paste error. (Since the result was address-taken and cast to void *, this wasn't a functional error, but it was conceptually wrong.) check-in: d11b0542b8 user: simon tags: trunk
2009-01-11
08:26
Arguments to ctype functions are required to be either EOF or representable as unsigned char. This means that passing in a bare char is incorrect on systems where char is signed. Sprinkle some appropriate casts to prevent this. check-in: 099ec87441 user: ben tags: trunk
08:20
Propagate my ctype fixes (r8404) from libcharset. check-in: 31f512a4c2 user: ben tags: trunk
2009-01-09
12:55
Weaken the assertion in general_textout(). It was failing in the case of double-width text (ESC # 3, ESC # 4, ESC # 6), because the string passed to it was not truncated to the same width as the clipping rectangle. (In fact, it _can't_ reliably be, in the case where the window width is odd.) So instead we just assert that we managed to _at least_ fill the clipping rectangle, not that we exactly filled it. The problem is easily reproduced by sending ESC # 8 (fill the screen with Es) followed by ESC # 3. It doesn't typically happen, though, if you _manually_ fill the screen with Es, because in that case PuTTY's terminal buffer ends up being filled with CSET_ACP | 'E' or similar, which means that general_textout() never gets called because one of the other branches of do_text_internal() does the work instead. ESC # 8 will fill the terminal buffer with genuine _Unicode_ 'E' characters, which exercises the failing code path. check-in: 5e99094c97 user: simon tags: trunk
2009-01-08
12:21
Another patch from Colin, providing a "make distclean" target in the autoconf makefile. check-in: 6167ee8ecf user: simon tags: trunk
12:19
Colin also suggests that we can replace the backticks in the GTK makefile with make's own $(shell ...) function, which means that gtk-config and krb5-config and so on only get run once per make invocation instead of once per gcc invocation. check-in: 6d8a27ba70 user: simon tags: trunk
12:18
Colin Watson reports a strange problem whereby krb5-config incorporates the environment variable CFLAGS into its output. Avoid exporting our version of it from the Makefile (which actually causes build failures, since quoting phase issues mean that the backticks in our version end up unexpanded). check-in: 4cf626f656 user: simon tags: trunk
2009-01-05
18:25
Rejig windlg.c:verify_ssh_host_key() to silence a warning. check-in: e26e7e1051 user: jacob tags: trunk
18:16
Remove a couple of unused variables. check-in: 021a9a45ae user: jacob tags: trunk
17:49
It's a new year (and there have even been checkins). check-in: 3b96830db1 user: jacob tags: trunk
17:36
sk_address_is_local() failed to cope when presented with a Unix-domain socket. This could cause Unix PuTTY to segfault when X forwarding over an SSH session through a proxy. (sk_getaddr() wouldn't cope either -- in that case, add an assertion to make it more obvious; I don't think it should ever happen.) check-in: 6691b9082e user: jacob tags: trunk
16:53
Be prepared for x11_setup_display() to return NULL (for instance, if DISPLAY has invalid contents). Simply refuse to try X forwarding in this circumstance. check-in: 09b6bc2c14 user: jacob tags: trunk
13:39
r5080 didn't go far enough -- since 0.58, anyone on Unix who didn't previously have default settings for "bell overload" mode will have inherited a twitchy set of defaults where bells are disabled after 2ms and enabled after 5ms, rather than 2s and 5s as intended. This error has probably propagated into some people's saved sessions by now, but there's not much to be done. check-in: 961a87a59a user: jacob tags: trunk
2009-01-04
20:45
Add some hard-coded textual literal-IP representations of localhost to sk_hostname_is_local(), to catch the case where we're doing something like X11 forwarding over SSH through a proxy, and we've thus disabled local lookup of hostnames. (I think this is what's behind the report in <e9a86996-5dc2-4428-9b0c-c65693ca6351@m32g2000hsf.googlegroups.com> in comp.security.ssh, although I'd like to know more of the circumstances.) check-in: 7bc06e3d51 user: jacob tags: trunk
19:15
...and fix an unlikely memory leak. check-in: d5bdfa2feb user: jacob tags: trunk
19:01
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.) check-in: 057f0b0fca user: jacob tags: trunk
17:36
r8305 made platform_x11_best_transport[] obsolete, but there still seem to be a few instances around; expunge them. check-in: 24aec5eb8d user: jacob tags: trunk
17:28
r8305 seems to have made Unix PuTTY rather over-keen on Unix-domain sockets; unless a protocol is explicitly specified with "tcp/foovax:0", it assume a Unix-domain socket, thus not allowing a remote display on a machine other than the client. check-in: ea832c43a2 user: jacob tags: trunk
16:24
Bah, I've bumped into this often enough. Change one unsatisfactory cast for another to shut up "warning: cast from pointer to integer of different size" (and hence a -Werror compile failure) when compiling for Unix with DEBUG defined on atreus (x86_64). Minimally checked that it doesn't introduce upset elsewhere (i386). check-in: cd26670299 user: jacob tags: trunk
15:43
Log reason for failure to create a connection to a local X display. check-in: ec4e3d53bd user: jacob tags: trunk
2008-12-29
14:04
r8338 broke pasting with Shift-Ins and from the context menu on Windows. Divert these to use the request_paste() interface. check-in: 4a0333b4d1 user: jacob tags: trunk
2008-12-20
13:43
"Derek" reports that the DECSLPP report of window-size-in-pixels (CSI 14 t) has width and height swapped. Since both a random xterm I have and <http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt> agree with him, I've changed ours. (This stuff appears to originate in dtterm, but I can't check the behaviour of that right now.) While I'm here, the are-we-iconified report (CSI 11 t) looks to have the wrong sense compared to the same sources, so swap that too. (All this has been this way since it was originally implemented in r1414, which doesn't cite a source. all-escapes is silent too.) check-in: 723579ac90 user: jacob tags: trunk
13:02
"Derek" points out that reporting of wheel event coordinates to the host on Windows was relative to the screen origin, not the window origin. check-in: 74835487a0 user: jacob tags: trunk
12:52
Cosmetic: clarify that term->xterm_mouse is not boolean, etc. check-in: cecf02ac91 user: jacob tags: trunk
2008-12-02
18:06
gtk_selection_clear_targets() does not exist on GTK 1, so ifdef it. check-in: 1722b59c4b user: simon tags: trunk
12:18
At some point recently, Unix PuTTY started suffering build errors using -DNO_GSSAPI. Move some ifdefs around so it stops. check-in: 449718590d user: simon tags: trunk
2008-12-01
17:03
Add missing call to gtk_selection_clear_targets(), without which the list of selection targets offered by GTK PuTTY/pterm grows an extra copy of each of the three supported text formats every time the user makes a selection! check-in: d7ac9e085e user: simon tags: trunk
15:18
Change the Unix version of Ssh_gss_name to be a gss_name_t rather than void *, and hence eliminate a few casts. The Windows definition is unchanged, but I daresay I've managed to stop it compiling nonetheless. check-in: 326c946211 user: ben tags: trunk
2008-11-30
15:35
As far as I can tell, "simple@putty.projects.tartarus.org" has always been implemented as a channel request, not a global one. Change documentation to match implementation. check-in: 6adcb69429 user: jacob tags: trunk
2008-11-28
12:28
Move the code that reads the Windows clipboard into a trivial subthread, so that it won't deadlock if fetching the content of the clipboard turns out to depend on a network connection forwarded through PuTTY. check-in: 9814c17c86 user: simon tags: trunk
2008-11-26
08:30
Jacob correctly points out that I accidentally lost a clearing of s->gss_sndtok in r8326. I'm not sure it was strictly necessary, since even if there's no send token, gss_init_sec_context() is meant to explicitly make it empty, but it wasn't an intentional change. check-in: c9729f111e user: ben tags: trunk
08:11
Fix a Windows-specific GSS crash introduced in r8326, which (again) apparently triggers in failure cases. Patch by Iain Patterson. check-in: de10671dea user: jacob tags: trunk
06:49
Mitigation for VU#958563: When using a CBC-mode server-to-client cipher under SSH-2, don't risk looking at the length field of an incoming packet until we've successfully MAC'ed the packet. This requires a change to the MAC mechanics so that we can calculate MACs incrementally, and output a MAC for the packet so far while still being able to add more data to the packet later. check-in: 4c69183b8d user: ben tags: trunk
2008-11-25
16:11
Now that we use real gss_buffer_ts, there's no need to muck about with casts when passing them to GSS-API functions. Removing them makes the code more readable and allows better type-checking. check-in: 972f7f9cba user: ben tags: trunk
12:54
Have wingss.c include <windows.h> by way of putty.h rather than directly. Fixes a build failure involving name clashes between winsock2.h and winsock.h, which had somehow managed to get included in succession. check-in: 390169a34f user: simon tags: trunk
12:43
Fixed a PuTTYtel startup assertion failure introduced in r8305. While I'm here, a cosmetic PuTTYtel change: remove a reference to SSH from the "logical host name" label in PuTTYtel only. check-in: b1eafe3828 user: jacob tags: trunk