Timeline

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

832 check-ins using file unix/xpmptcfg.c version 1d533aaedf

2014-02-24
17:35
Add a missing bn_restore_invariant in RSA blinding code. We were inventing a random number by starting with a long zero bignum and then setting bits at random, which left an opportunity for the result to be a non-normalised representation (with a leading zero word) and hence fail an assertion in bignum_cmp. Leaf check-in: d7de89b12b user: simon tags: trunk
2014-02-22
12:02
Add some assertions in sshzlib.c. gcc 4.8 compiling with -O3 gives a new warning about the access to st->pending at the top of lz77_compress, because for some reason it thinks there's an out-of-bounds array access there (or perhaps just a potential one, I'm not really sure which side -Warray-bounds is erring on). Add an assertion reassuring it that st->npending can't get bigger than the size of st->pending at the site it's complaining about, and a second one at the site where st->npending is increased (just in case my analysis of why it can't happen was wrong!). Also add a comment explaining the assertions. check-in: d59600bfab user: simon tags: trunk
12:02
Add the autogenerated empty.h to CLEANFILES. Colin Watson points out that it's untidy to create it with the makefile but not clean it up again in the same way. check-in: 9bdcecee98 user: simon tags: trunk
12:02
Add the 'subdir-objects' option in the automake makefile. This rearranges the object files so that they each live alongside their original source file, instead of all being in the same directory. To my way of thinking this is a more or less neutral change (perhaps marginally less tidy), but autotools is apparently beginning to think it's the One True Way and 1.14 will give a warning if you don't have it enabled. check-in: 30b2a618a6 user: simon tags: trunk
12:01
Move the Unix configure script up to the top level. Previously, 'configure' and its assorted machinery lived in the 'unix' subdir, because that seemed like a clean place to keep it given that all the other per-platform Makefiles live in their platform directories. However, this never sat all that happily with autotools, and even less so now that it likes to have object file pathnames parallel source file pathnames: if you have Makefile.am refer to source files outside its subdir as "../terminal.c" and enable subdir-objects then any out-of-tree build calls the corresponding object file "../terminal.o" and so your build products mostly end up at the directory above your build dir! And as of autotools 1.14 my previous compensatory bodge of prefixing every source file path in Makefile.am with "$(srcdir)" has stopped working too. So I'm giving in to necessity, and changing policy by moving the configure machinery up to the top level of the source tree where autotools will be less confused by it. This should not be taken as any indication of the primacy of the Unix port, only of the recalcitrance of autotools. Whereas before we had a trivial script called 'configure' at the top level that invoked unix/configure to effectively do an 'out-of-tree build' (for make purposes) at the top level of the source tree, we now have a similar script in unix/configure. So this _should_ make very little difference: people who were previously running configure from the top level should still be able to, and likewise people who were running it from the unix subdir. check-in: c37628a5ae user: simon tags: trunk
2014-02-16
10:40
Enable xterm mouse reporting of wheel actions in GTK. I had somehow missed this completely out of the GTK mouse-button handling and never noticed until now! Of course, like any other mouse action, if you want it to be handled locally rather than passed through then you can hold down Shift. check-in: 7b7fe7cab5 user: simon tags: trunk
10:40
Stop sending release events for mouse wheel 'buttons' in X mouse mode. On Windows (X mouse reporting of the mouse wheel isn't currently done by the Unix front end, though I'm shortly about to fix that too) a mouse wheel event is translated into a virtual button, and we send both a press and a release of that button to terminal.c, which encodes both in X mouse reporting escape sequences and passes them on to the server. This isn't consistent with what xterm does - scroll-wheel events are encoded _like_ button presses, but differ semantically in that they don't have matching releases. So we're updating to match xterm. check-in: 318dea6985 user: simon tags: trunk
2014-02-05
15:51
Revert half of r10135, and re-fix properly. One of my changes in uxnet.c was outside the NO_IPV6 ifdef, and broke compilation in the normal mode. Revert all changes in that file and replace with a reference to the 'step' parameter in the no-IPv6 version of the SOCKADDR_FAMILY macro, so that those warnings are squelched anyway. check-in: abd47d5258 user: simon tags: trunk
2014-02-04
16:37
Fix warnings when compiling with -DNO_IPV6. A user pointed out that 'family' was uninitialised in config.c, and when I tried test-building with -DNO_IPV6 (and the usual -Werror, of course) some unused variables showed up in uxnet.c too. check-in: a3ff424718 user: simon tags: trunk
2014-01-25
12:38
Don't unconditionally reset scrollback on certain escape sequences. Handlers for a number of escape sequences, notably including ESC[J and the sequences that switch to/from the alternate screen, were unconditionally resetting the scrollback instead of first checking the 'Reset scrollback on display activity' configuration option. I've added the missing if statements, so now 'Reset scrollback on display activity' should actually mean what it says. For example, this would have inconvenienced an mplayer user, who wouldn't be able to go up and check their scrollback while mplayer was repeatedly redisplaying its status line, because mplayer uses ESC[J to erase each version of the status line before printing the next version. check-in: 02395144a9 user: simon tags: trunk
09:59
Fix a potential crash in ssh_setup_portfwd. If we search for a colon by computing ptr + host_strcspn(ptr,":"), then the resulting pointer is always non-NULL, and the 'not found' condition is not !p but !*p. This typo could have caused PuTTY to overrun a string, but not in a security-bug sense because any such string would have to have been loaded from the configuration rather than received from a hostile source. check-in: 55833059a8 user: simon tags: trunk
09:58
Support explicit IPv6 source addresses in Windows port forwarding. There's been a long-standing FIXME in Windows's sk_newlistener which says that in IPv6 mode, an explicit source address (e.g. from a command-line option of the form -L srcaddr:12345:dest:22) is ignored. Now it's honoured if possible. check-in: 54d31acb43 user: simon tags: trunk
09:58
Avoid misidentifying unbracketed IPv6 literals as host:port. Both GUI PuTTY front ends have a piece of logic whereby a string is interpreted as host:port if there's _one_ colon in it, but if there's more than one colon then it's assumed to be an IPv6 literal with no trailing port number. This permits the PuTTY command line to take strings such as 'host', 'host:22' or '[::1]:22', but also cope with a bare v6 literal such as '::1'. This logic is also required in the two Plink front ends and in the processing of CONF_loghost for host key indexing in ssh.c, but was missing in all those places. Add it. check-in: dac07879fa user: simon tags: trunk
09:58
Use the new host_str* functions to improve IPv6 literal support. I've gone through everywhere we handle host names / addresses (on command lines, in PuTTY config, in port forwarding, in X display names, in host key storage...) and tried to make them handle IPv6 literals sensibly, by using the host_str* functions I introduced in my previous commit. Generally it's now OK to use a bracketed IPv6 literal anywhere a hostname might have been valid; in a few cases where no ambiguity exists (e.g. no :port suffix is permitted anyway) unbracketed IPv6 literals are also acceptable. check-in: 7c4cad97cb user: simon tags: trunk
09:58
New hostname-handling functions in misc.c. These are intended to make it easier to handle strings of the form "hostname:port" or other colon-separated things including hostnames (such as the -L and -R command-line option arguments), even though the hostname part might be a square-bracketed IPv6 address literal containing colons that have to _not_ be treated as separating the top-level string components. Three of these functions have semantics as much like existing C library functions as I could make them (host_strchr, host_strrchr, host_strcspn) so that it wouldn't be too error-prone to replace existing C functions with them at lots of call sites. The fourth function (host_strduptrim) just strips square brackets off anything that looks like an IPv6 literal. check-in: fb9857d0e6 user: simon tags: trunk
2014-01-16
13:16
Fix assertion failure in Unix PuTTYgen exports. The assertions I added to sshrand.c in r9930 are now justified, because they were failing when cmdgen was used to convert a key into either foreign private key file format - both the export functions require random_byte() for one reason or another, and random_ref() hadn't been called first. check-in: fbcd95cbc9 user: simon tags: trunk
2014-01-15
17:57
It's a new year. check-in: be67deef94 user: jacob tags: trunk
17:46
Remove mention of ASCIICTLS. It hasn't done anything since r673 in 2000. check-in: 6b47391217 user: jacob tags: trunk
2014-01-11
05:23
Generate IDE project files for Visual Studio 2010 and 2012. Thanks to Mike Edenfield for the initial version of this patch; I've polished it up a bit (in particular inventing a more overengineered GUID generation strategy) but most of it is his. check-in: bf25c6f428 user: simon tags: trunk
2014-01-09
04:22
Added putty-cac current state Leaf check-in: 62dff76227 user: rkeene tags: putty-cac
03:42
More work towards smartcard support Leaf check-in: fdc3acb4a7 user: rkeene tags: smartcard
2014-01-07
17:26
Rename the handle-type enumeration values. Mike Edenfield points out that modern versions of the Windows SDK have decided that 'INPUT' is a sensible name for an OS data structure (sigh), and provided a patch to add a disambiguating prefix to winhandl.c's enum values INPUT, OUTPUT and FOREIGN. check-in: c4c02ad9d3 user: simon tags: trunk
06:21
More work towards adding Smartcard support check-in: ac99fad22c user: rkeene tags: smartcard
05:30
Stubbed out module loading check-in: ddd30aa4a3 user: rkeene tags: smartcard
05:13
Corrected issues with copying in the provider/pin check-in: cd84c88205 user: rkeene tags: smartcard
05:09
Merged in Cygwin fixes check-in: fdef7bc4c1 user: rkeene tags: smartcard
05:08
Updated to always indicate that PROPERTYKEY is defined in Cygwin/Mingw32 Leaf check-in: c10746d902 user: rkeene tags: new-cygwin-fixes
05:03
Corrected issue with HIGH_SURROGATE_START being undefined in some cases check-in: 2483280575 user: rkeene tags: new-cygwin-fixes
05:01
Fixed INPUT conflict with tagINPUT in winuser.h check-in: a588f6596d user: rkeene tags: new-cygwin-fixes
04:59
Removed "-mno-cygwin" as it is no longer used in mingw32 check-in: 7d5a75bea0 user: rkeene tags: new-cygwin-fixes
04:57
Create new branch named "new-cygwin-fixes" check-in: 697fe1728c user: rkeene tags: new-cygwin-fixes
04:56
Start of work on adding smartcard support check-in: 0f7cb20b46 user: rkeene tags: smartcard
00:10
Create new branch named "smartcard" check-in: 9be29e78b7 user: rkeene tags: smartcard
2013-12-02
13:27
Include another autoconf dropping in svn:ignore. check-in: 19507fbbd4 user: simon tags: trunk
13:26
Fix breakage of SSH-2 packet decompression by r10070. The line that resets st->pktin->length to cover only the semantic payload of the SSH message was overwriting the modification to st->pktin->length performed by the optional decompression step. I didn't notice because I don't habitually enable compression. check-in: bcffebc70c user: simon tags: trunk
2013-12-01
12:02
Use printf rather than echo to generate \versionid. (Sacrificing the ability to build PuTTY docs from Halibut source on SunOS 4, apparently, but I expect we'll live.) check-in: 4468ef8629 user: jacob tags: trunk
2013-11-30
14:01
Document the 'bold black' hazard of bold-as-font. check-in: 4c056f3084 user: jacob tags: trunk
12:04
Make GTK idle and quit function setup idempotent. I found last week that when a local proxy process terminated unexpectedly, Unix PuTTY went into a tight loop calling quit functions, because if idle_toplevel_callback_func is called from inside a subsidiary gtk_main then it will schedule a quit function and _not_ disable itself, so that that quit function keeps being rescheduled on subsequent calls. To fix, I've tried to make the whole handling of idle and quit functions more sensibly robust: we keep our own boolean flag indicating whether each of our functions has already been scheduled with GTK, and if so, we don't schedule the same one again. Also, when idle_toplevel_callback_func schedules a quit function, it should unschedule itself since it's now done everything it can until a gtk_main instance quits. check-in: f92a403fe9 user: simon tags: trunk
2013-11-25
13:46
Fix interaction of insch() with selection highlights. Previously I had unthinkingly called the general-purpose check_selection() routine to indicate that I was going to mess with n character cells right of the cursor position, causing the selection highlight to be removed if it intersected that region. This is all wrong, since actually the whole region from cursor to EOL is modified by any character insertion or deletion, so if we were going to call check_selection it should be on that whole region. (Quick demo: select part of the line to the right of the cursor, then emit ESC[P or ESC[@ and see the text move left or right while the highlight stays put.) So we could just call check_selection() on that larger affected region, and that would be correct. However, we can do something slightly more elegant in the case where the selection is contained entirely within the subregion that moves to one side (as opposed to the characters that actually vanish at one or other end): we can move the selection highlight with the text under it, to preserve the visual reminder of which text was selected for as long as possible. check-in: 8850239d61 user: simon tags: trunk
12:35
Switch to using SIDs in make_private_security_descriptor(). Daniel Meidlinger reports that at least one Windows machine which is not obviously otherwise misconfigured will respond to our SetEntriesInAcl call with odd errors like ERROR_NONE_MAPPED or ERROR_TRUSTED_RELATIONSHIP_FAILURE. This is apparently to do with failure to convert the names "EVERYONE" and "CURRENT_USER" used in the ACL specification to SIDs. (Or perhaps only one of them is the problem - I didn't investigate in that direction.) If we instead construct a fully SID-based ACL, using the well-known world SID in place of EVERYONE and calling our existing get_user_sid routine in place of CURRENT_USER, he reports that the problem goes away, so let's do that instead. While I'm here, I've slightly simplified the function prototype of make_private_security_descriptor(), by turning 'networksid' into an internal static that we can reuse in subsequent calls once we've set it up. (Mostly because I didn't fancy adding another two pointless parameters at every call site for the two new SIDs.) check-in: 349ccaac0a user: simon tags: trunk
2013-11-23
10:54
Remove an unused variable orphaned by r10092. check-in: 837e4c1632 user: simon tags: trunk
2013-11-22
13:41
SetEntriesInAcl returns its error code directly. According to the MSDN documentation, that is. Why oh why? Everything _else_ leaves it in GetLastError(). check-in: acd593e0ad user: simon tags: trunk
13:41
Pass the right number of entries to SetEntriesInAcl! check-in: 074d8b4052 user: simon tags: trunk
13:41
Include the numeric error code in win_strerror's output. This will be useful if someone gets a mysterious Windows error on a system configured into a language we don't speak - if they cut and paste the error message to send to us, then we won't have to try to translate it. check-in: e00724f199 user: simon tags: trunk
2013-11-18
16:34
Fix up the Windows help context stuff for the new connection sharing controls. check-in: 5d4d60ef11 user: jacob tags: trunk
13:07
Gracefully degrade in the absence of CryptProtectMemory. XP doesn't have it, and I think having connection sharing work without its privacy enhancement is better than having it not work at all. check-in: e5114b37b0 user: simon tags: trunk
13:07
Restore compatibility with older autoconfs. The one in Ubuntu 10.04 doesn't know what AM_PROG_AR means, so configure.ac was broken in r10053 when fixing compatibility with later versions; you can't win... check-in: 72ed2c889b user: simon tags: trunk
2013-11-17
08:05
Fix an assortment of dupprintf() format string bugs. I've enabled gcc's format-string checking on dupprintf, by declaring it in misc.h to have the appropriate GNU-specific attribute. This pointed out a selection of warnings, which I've fixed. check-in: 44f33ce7e0 user: simon tags: trunk
08:05
Implement connection sharing between instances of PuTTY. The basic strategy is described at the top of the new source file sshshare.c. In very brief: an 'upstream' PuTTY opens a Unix-domain socket or Windows named pipe, and listens for connections from other PuTTYs wanting to run sessions on the same server. The protocol spoken down that socket/pipe is essentially the bare ssh-connection protocol, using a trivial binary packet protocol with no encryption, and the upstream has to do some fiddly transformations that I've been referring to as 'channel-number NAT' to avoid resource clashes between the sessions it's managing. This is quite different from OpenSSH's approach of using the Unix- domain socket as a means of passing file descriptors around; the main reason for that is that fd-passing is Unix-specific but this system has to work on Windows too. However, there are additional advantages, such as making it easy for each downstream PuTTY to run its own independent set of port and X11 forwardings (though the method for making the latter work is quite painful). Sharing is off by default, but configuration is intended to be very easy in the normal case - just tick one box in the SSH config panel and everything else happens automatically. check-in: 998dfad436 user: simon tags: trunk
08:05
Move the dynamic loading of advapi into its own module. There's now a winsecur.[ch], which centralises helper functions using the Windows security stuff in advapi.h (currently just get_user_sid), and also centralises the run-time loading of those functions and checking they're all there. check-in: fea133a5df user: simon tags: trunk
08:05
Get rid of the error-return mechanism from x11_init. Now that it doesn't actually make a network connection because that's deferred until after the X authorisation exchange, there's no point in having it return an error message and write the real output through a pointer argument. Instead, we can just have it return xconn directly and simplify the call sites. check-in: 73c26030cf user: simon tags: trunk
08:05
Refactor the construction of X protocol greetings. I've moved it out into a separate function, preparatory to calling it from somewhere completely different in changes to come. Also, we now retain the peer address sent from the SSH server in string form, rather than translating it immediately into a numeric IP address, so that its original form will be available later to pass on elsewhere. check-in: 6ce24b09de user: simon tags: trunk
08:05
Prepare to have multiple X11 auth cookies valid at once. Rather than the top-level component of X forwarding being an X11Display structure which owns some auth data, it's now a collection of X11FakeAuth structures, each of which owns a display. The idea is that when we receive an X connection, we wait to see which of our available auth cookies it matches, and then connect to whatever X display that auth cookie identifies. At present the tree will only have one thing in it; this is all groundwork for later changes. check-in: dce51d4dc0 user: simon tags: trunk
08:05
Decouple X socket opening from x11_init(). Now we wait to open the socket to the X server until we've seen the authorisation data. This prepares us to do something else with the channel if we see different auth data, which will come up in connection sharing. check-in: 17981b3538 user: simon tags: trunk
08:05
Add missing 'const' in the des_*_xdmauth functions. check-in: d5d9fea99c user: simon tags: trunk
08:04
Add a missing null pointer check in s_write. I don't know that this can ever be triggered in the current state of the code, but when I start mucking around with SSH session closing in the near future, it may be handy to have it. check-in: 4e49a3898d user: simon tags: trunk
08:04
Remove sk_{get,set}_private_ptr completely! It was only actually used in X11 and port forwarding, to find internal state structures given only the Socket that ssh.c held. So now that that lookup has been reworked to be the sensible way round, private_ptr is no longer used for anything and can be removed. check-in: 19677e577d user: simon tags: trunk
08:04
Refactor ssh.c's APIs to x11fwd.c and portfwd.c. The most important change is that, where previously ssh.c held the Socket pointer for each X11 and port forwarding, and the support modules would find their internal state structure by calling sk_get_private_ptr on that Socket, it's now the other way round. ssh.c now directly holds the internal state structure pointer for each forwarding, and when the support module needs the Socket it looks it up in a field of that. This will come in handy when I decouple socket creation from logical forwarding setup, so that X forwardings can delay actually opening a connection to an X server until they look at the authentication data and see which server it has to be. However, while I'm here, I've also taken the opportunity to clean up a few other points, notably error message handling, and also the fact that the same kind of state structure was used for both connection-type and listening-type port forwardings. Now there are separate PortForwarding and PortListener structure types, which seems far more sensible. check-in: 7ab21bb146 user: simon tags: trunk
08:04
Reliably initialise uxnet's socket fd fields to -1. This prevents embarrassing mess-ups involving getting back a Socket which has mostly been memset to 0 but contains an error message, sk_close()ing it to free the memory, and finding that standard input has been closed as a side effect. check-in: 3f38d36d6e user: simon tags: trunk
08:04
Add support in uxnet.c for Unix-domain listening sockets. There are two new functions: one to construct a SockAddr wrapping a Unix socket pathname (which can also be used as the destination for new_connection), and one to establish a new listening Unix-domain socket. check-in: fe289d405b user: simon tags: trunk
08:04
Complete rewrite of the packet log censoring code. Because the upcoming connection sharing changes are going to involve us emitting outgoing SSH packets into our log file that we didn't construct ourselves, we can no longer rely on metadata inserted at packet construction time to tell us which parts of which packets have to be blanked or omitted in the SSH packet log. Instead, we now have functions that deal with constructing the blanks array just before passing all kinds of packet (both SSH-1 and SSH-2, incoming and outgoing) to logging.c; the blanks/nblanks fields in struct Packet are therefore no longer needed. check-in: 88f08b9cb9 user: simon tags: trunk
08:04
Clean up the 'data' vs 'body' pointers in struct Packet. There's always been some confusion over exactly what it all means. I haven't cleaned it up to the point of complete sensibleness, but I've got it to a point where I can at least understand and document the remaining non-sensibleness. check-in: c011fa97b1 user: simon tags: trunk
08:04
Add support for Windows named pipes. This commit adds two new support modules, winnpc.c and winnps.c, which deal respectively with being a client and server of a Windows named pipe (which, in spite of what Unix programmers will infer from that name, is actually closer to Windows's analogue of a Unix-domain socket). Each one provides a fully featured Socket wrapper around the hairy Windows named pipe API, so that the rest of the code base should be able to use these interchangeably with ordinary sockets and hardly notice the difference. As part of this work, I've introduced a mechanism in winhandl.c to permit it to store handles of event objects on behalf of other Windows support modules and deal with passing them to applications' main event loops as necessary. (Perhaps it would have been cleaner to split winhandl.c into an event-object tracking layer analogous to uxsel, and the handle management which is winhandl.c's proper job, but this is less disruptive for the present.) check-in: 8ceffb2b33 user: simon tags: trunk
08:03
Replace the hacky 'OSSocket' type with a closure. The mechanism for constructing a new connection-type Socket when a listening one receives an incoming connection previously worked by passing a platform-specific 'OSSocket' type to the plug_accepting function, which would then call sk_register to wrap it with a proper Socket instance. This is less flexible than ideal, because it presumes that only one kind of OS object might ever need to be turned into a Socket. So I've replaced OSSocket throughout the code base with a pair of parameters consisting of a function pointer and a context such that passing the latter to the former returns the appropriate Socket; this will permit different classes of listening Socket to pass different function pointers. In deference to the reality that OSSockets tend to be small integers or pointer-sized OS handles, I've made the context parameter an int/pointer union that can hold either of those directly, rather than the usual approach of making it a plain 'void *' and requiring a context structure to be dynamically allocated every time. check-in: c7d41826aa user: simon tags: trunk
08:03
Implement freezing on Windows handle sockets. That's been a FIXME in the code for ages, because it's difficult to get winhandl.c to stop an already-started read from a handle (since the read is a blocking system call running in a separate thread). But I now realise it isn't absolutely necessary to do so - you can just buffer one lot of data from winhandl and _then_ tell it to stop. check-in: 2fcad446d4 user: simon tags: trunk
08:03
Factor out the HANDLE-to-Socket adapter from winproxy.c. It's now kept in a separate module, where it can be reused conveniently for other kinds of Windows HANDLE that I want to wrap in the PuTTY Socket abstraction - for example, the named pipes that I shortly plan to use for the Windows side of connection-sharing IPC. check-in: b85c096215 user: simon tags: trunk
08:03
Add a Socket implementation which just holds an error message. This isn't yet used, but I plan to use it in situations where you have to report errors by returning a valid Socket on which the client wlil call sk_socket_error, but in fact you notice the error _before_ instantiating your usual kind of Socket. The resulting Socket is usable for nothing except reading out the error string and closing it. check-in: 20d72c8bd1 user: simon tags: trunk
08:03
Move SSH protocol enumerations out into ssh.h. This permits packet type codes and other magic numbers to be accessed from modules other than ssh.c. check-in: 71d87820cd user: simon tags: trunk
08:03
Move cipher settings into their own config panel. This makes room in the main SSH panel for new options about connection sharing, which I'm shortly going to add. check-in: 5a25ae6602 user: simon tags: trunk
08:03
Clean up the semantics of the ssh_rportfwd structure. It's now indexed by source hostname as well as source port (so that separate requests for the server to listen on addr1:1234 and addr2:1234 can be disambiguated), and also its destination host name is dynamically allocated rather than a fixed-size buffer. check-in: 87da2eda2d user: simon tags: trunk
08:03
Find ToUnicodeEx() at run time, not load time. This restores PuTTY's backward compatibility to versions of Windows too old to have ToUnicodeEx in their system libraries, which was accidentally broken in 0.63. check-in: f163f89666 user: simon tags: trunk
2013-11-11
17:01
Replace GetQueueStatus with PeekMessage(PM_NOREMOVE). A couple of users report that my recent reworking of the Windows top-level message loop has led to messages occasionally being lost, and MsgWaitForMultipleObjects blocking when it ought to have been called with a zero timeout. I haven't been able to reproduce this myself, but according to one reporter, PeekMessage(PM_NOREMOVE) is effective at checking for a non-empty message queue in a way that GetQueueStatus is not. Switch to using that instead. Thanks to Eric Flumerfelt for debugging and testing help. check-in: 0eada414dc user: simon tags: trunk
2013-10-26
09:00
Fix build failures on Ubuntu 13.10. Automake now insists that we run AM_PROG_AR if we're going to build a library, and AM_PROG_CC_C_O if we're going to build anything with extra compile options. Those extra macros seem harmless in previous versions of automake. check-in: 4dc573c397 user: simon tags: trunk
2013-10-25
12:44
Avoid leaving unread Windows messages in the queue. Jochen Erwied points out that once you've used PeekMessage to remove _one_ message from the message queue, MsgWaitForMultipleObjects will consider the whole queue to have been 'read', or at least looked at and deemed uninteresting, and so it will block until a further message comes in. Hence, my change in r10040 which stops us from looping on PeekMessage until the queue is empty has the effect of causing the rest of the message queue not to be acted on until a new message comes in to unblock it. Fix by checking if the queue is nonempty in advance of calling MsgWaitForMultipleObjects, and if so, giving it a zero timeout just as we do if there's a pending toplevel callback. check-in: bb372d7013 user: simon tags: trunk
2013-10-09
13:38
random_ref() should always increment the reference count. No current PuTTY utility was calling random_ref more than once per run (ssh.c and the two main PuTTYgen programs call it once each), but if one ever does (or if derived code does), it will want the reference count to actually work sensibly. check-in: 8a375b13f8 user: simon tags: trunk
13:36
Don't pass WinSock error codes to strerror. Martin Prikryl helpfully points out that when I revamped the socket error mechanism using toplevel callbacks, I also accidentally passed the error code to the wrong function. Use winsock_error_string instead. check-in: b4dcae4371 user: simon tags: trunk
2013-09-23
09:35
Fix cut-and-paste errors in nonfatal() implementations. Unix GUI programs should not say 'Fatal Error' in the message box title, and Plink should not destroy its logging context as a side effect of printing a non-fatal error. Both appear to have been due to inattentive cut and paste from the pre-existing fatal error functions. check-in: 3a81deedf0 user: simon tags: trunk
2013-09-15
09:40
Oops! Remove a tight-looping diagnostic. I temporarily applied it as a means of testing the revised event loops in r10040, and accidentally folded it into my final commit instead of backing it out. Ahem. check-in: 5bed7cc5ee user: simon tags: trunk
09:05
Remove the timed part of the terminal paste mechanism. In r10020 I carefully reimplemented using timing.c and callback.c the same policy for large pastes that the previous code appeared to be implementing ad-hoc, which included a 450ms delay between sending successive lines of pasted text if no visible acknowledgment of the just-sent line (in the form of a \n or \r) came back from the application. However, it turns out that that *wasn't* what the old code was doing. It *would* have done that, but for the bug that it never actually set the 'last_paste' variable, and never has done since it was first introduced way back in r516! So the policy I thought had been in force forever has in fact only been in force since I unwittingly fixed that bug in r10020 - and it turns out to be a bad idea, breaking pastes into vi in particular. So I've removed the timed paste code completely, on the basis that it's never actually worked and nobody seems to have been unhappy about that. Now we still break large pastes into separate lines and send them in successive top-level callbacks, and the user can still press a key to interrupt a paste if they manage to catch it still going on, but there's no attempted *delay* any more. (It's possible that what I *really* ought to be doing is calling back->sendbuffer() to see whether the backend is consuming the data pasted so far, and if not, deferring the rest of the paste until the send buffer becomes smaller. Then we could have pasting be delayed by back-pressure from the recipient, and still manually interruptible during that delay, but not have it delayed by anything else. But what we have here should at least manage to be equivalent to the *actual* rather than the intended old policy.) check-in: 926b4f918a user: simon tags: trunk
09:05
Only run one toplevel callback per event loop iteration. This change attempts to reinstate as a universal property something which was sporadically true of the ad-hockery that came before toplevel callbacks: that if there's a _very long_ queue of things to be done through the callback mechanism, the doing of them will be interleaved with re-checks of other event sources, which might (e.g.) cause a flag to be set which makes the next callback decide not to do anything after all. check-in: 36d3c24f08 user: simon tags: trunk
2013-09-08
08:20
Handle socket errors on half-open channels. Anthony Ho reports that this can occur naturally in some situation involving Windows 8 + IE 11 and dynamic port forwarding: apparently we get through the SOCKS negotiation, send our CHANNEL_OPEN, and then *immediately* suffer a local WSAECONNABORTED error before the server has sent back its OPEN_CONFIRMATION or OPEN_FAILURE. In this situation ssh2_channel_check_close was failing to notice that the channel didn't yet have a valid server id, and sending out a CHANNEL_CLOSE anyway containing 32 bits of uninitialised nonsense. We now handle this by turning our half-open CHAN_SOCKDATA_DORMANT into a half-open CHAN_ZOMBIE, which means in turn that our handler functions for OPEN_CONFIRMATION and OPEN_FAILURE have to recognise and handle that case, the former by immediately initiating channel closure once we _do_ have the channel's server id to do it with. check-in: 1593971ebd user: simon tags: trunk
02:14
Pass an error message through to sshfwd_unclean_close. We have access to one at every call site, so there's really no reason not to send it through to ssh.c to be logged. check-in: 36349ac57c user: simon tags: trunk
2013-09-07
11:15
Fix SSH2_MSG_CHANNEL_EXTENDED_DATA in logparse. It looks as if it's never worked at all: it had a spurious second printf, it completely forgot to allow for the uint32 type code that SSH2_MSG_CHANNEL_DATA doesn't have, it accessed the channel state's sequence number fields in a way that made no sense and didn't match the rest of the program, *and* it misinvoked the file opening API. I must have never had an occasion to test it. check-in: a938a3ac2e user: simon tags: trunk
11:15
Make logparse handle completely bogus channel numbers. Previously it would throw a bunch of Perl undefined-variable-usage warnings; now it cleanly detects the problem, dumps as much of the message as it still reasonably can, and doesn't update any channel states. check-in: 21376cee1b user: simon tags: trunk
2013-08-26
06:55
Fix free of an uninitialised pointer. CHAN_AGENT channels need c->u.a.message to be either NULL or valid dynamically allocated memory, because it'll be freed by ssh_channel_destroy. This bug triggers if an agent forwarding channel is opened and closed without having sent any queries. check-in: 7b9042322c user: simon tags: trunk
2013-08-22
12:45
Fix handling of IPv6 dynamic forwardings. During the Conf revamp, I changed the internal representation of dynamic forwardings so that they were stored as the conceptually sensible L12345=D rather than the old D12345, and added compensation code to translate to the latter form for backwards-compatible data storage and for OpenSSH-harmonised GUI display. Unfortunately I forgot that keys in the forwarding data can also prefix the L/R with a character indicating IPv4/IPv6, and my translations didn't take account of that possibility. Fix them. check-in: 2ca638ec2c user: simon tags: trunk
2013-08-18
05:56
Don't run toplevel callbacks in modal dialogs. Because some of them can call gtk_main_quit(), which completely confuses the dialog box system. check-in: d89571a733 user: simon tags: trunk
01:48
Sensibly enforce non-interactive rekeying. We now only present the full set of host key algorithms we can handle in the first key exchange. In subsequent rekeys, we present only the host key algorithm that we agreed on the previous time, and then we verify the host key by simply enforcing that it's exactly the same as the one we saw at first and disconnecting rudely if it isn't. check-in: cb5323bd7c user: simon tags: trunk
2013-08-17
11:06
Make calling term_nopaste() a cross-platform feature. It was one of those things that went in ages ago on Windows and never got replicated in the Unix front end. And it needn't be: ldisc.c is a perfect place to put it, since it knows which of the data it's sending is based on a keystroke and which is automatically generated, and it also has access to the terminal context. So now a keypress can interrupt a runaway paste on all platforms. check-in: 98e29c499b user: simon tags: trunk
11:06
Revamp Windows pending_netevent using toplevel callbacks. This greatly simplifies the process of calling select_result() from the top level after receiving WM_NETEVENT. check-in: c50a760764 user: simon tags: trunk
11:06
Revamp net_pending_errors using toplevel callbacks. Again, I've removed the special-purpose ad-hockery from the assorted front end message loops that dealt with deferred handling of socket errors, and instead uxnet.c and winnet.c arrange that for themselves by calling the new general top-level callback mechanism. check-in: 441fc5a4dd user: simon tags: trunk
11:06
Revamp GTK's session close handling using toplevel callbacks. Instead of having a special GTK idle function for dealing with session closing, I now use the new top-level callback mechanism which is slightly simpler for calling a one-off function. Also in this commit, I've arranged for connection_fatal to queue a call to the same session close function after displaying the message box, with the effect that now all the same processing takes place no matter whether the session closes cleanly or uncleanly - e.g. the SSH specials submenu is cleaned out, as it should be. check-in: 030eccd1a1 user: simon tags: trunk
11:06
Revamp Windows's close_session() using toplevel callbacks. Instead of setting a must_close_session flag and having special code in the message loop to check it, we'll schedule the call to close_session using the new top-level callback system. check-in: f66bde9fae user: simon tags: trunk
11:06
Revamp the terminal paste mechanism using toplevel callbacks. I've removed the ad-hoc front-end bodgery in the Windows and GTK ports to arrange for term_paste to be called at the right moments, and instead, terminal.c itself deals with knowing when to send the next chunk of pasted data using a combination of timers and the new top-level callback mechanism. As a happy side effect, it's now all in one place so I can actually understand what it's doing! It turns out that what all that confusing code was up to is: send a line of pasted data, and delay sending the next line until either a CR or LF is returned from the server (typically indicating that the pasted text has been received and echoed) or 450ms elapse, whichever comes first. check-in: e18f3877ae user: simon tags: trunk
11:06
Add a general way to request an immediate top-level callback. This is a little like schedule_timer, in that the callback you provide will be run from the top-level message loop of whatever application you're in; but unlike the timer mechanism, it will happen _immediately_. The aim is to provide a general way to avoid re-entrance of code, in cases where just _doing_ the thing you want done is liable to trigger a confusing recursive call to the function in which you came to the decision to do it; instead, you just request a top-level callback at the message loop's earliest convenience, and do it then. check-in: 0345763d47 user: simon tags: trunk
2013-08-15
01:42
Sebastian Kuschel reports that pfd_closing can be called for a socket error with pr->c NULL, in which case calling sshfwd_unclean_close on it will dereference NULL and segfault. Write an alternative error handling path for that possibility. (I don't know if it's the only way, but one way this can happen is if you're doing dynamic forwarding and the socket error occurs during SOCKS negotiation, in which case no SSH channel has been set up yet because we haven't yet found out what we want to put in the direct-tcpip channel open message.) check-in: 88d8a274b3 user: simon tags: trunk
2013-08-13
01:46
It turns out I was a little over-strict in my handling of EOF in pscp.c when I did the big revamp in r9279: I assumed that in any SCP connection we would be the first to send EOF, but in fact this isn't true - doing downloads with old-SCP, EOF is initiated by the server, so we were spuriously reporting an error for 'unexpected' EOF when everything had gone fine. Thanks to Nathan Phelan for the report. check-in: dbbbe4df65 user: simon tags: trunk
2013-08-08
12:22
sbcsgen.pl uses 'select' to point Perl at a different default output handle. Revert that when we hackily call it from mkfiles.pl, so that if I have a need to insert diagnostics in the latter they won't go into the end of sbcsdat.c. check-in: 7c257e8f47 user: simon tags: trunk
2013-08-07
01:22
Revert the default for font bolding style back to using colours rather than fonts. I broke this in r9559 when I added the option for 'both', because the internal representation got offset by one so as to change from a boolean to two bitfields and I must have confused myself about what the default should be. check-in: 31522c3eb3 user: simon tags: trunk
2013-08-06
12:09
Bump version number prior to tagging 0.63. check-in: ff340ac572 user: simon tags: trunk
11:45
One more defensive assert, just to be sure. check-in: d6125310dc user: simon tags: trunk
2013-08-05
14:50
The bignum code has two representations of zero, since bn_restore_invariant (and the many loops that duplicate it) leaves a single zero word in a bignum representing 0, whereas the constant 'Zero' does not have any data words at all. Cope with this in bignum_cmp. (It would be a better plan to decide on one representation and stick with it, but this is the less disruptive fix for the moment.) check-in: 87e71d1709 user: simon tags: trunk
14:50
Add some more precautionary assertions, just in case anything wildly out of range manages to get past other recent fixes. check-in: 165e9c6988 user: simon tags: trunk
10:15
Belatedly update the copyright year to 2013. check-in: f12ca7dab6 user: jacob tags: trunk
2013-08-04
17:33
Fix memory leaks in the new error return from modinv. check-in: 831e4c58e8 user: simon tags: trunk
14:34
Spot when we didn't successfully create an RSA public key from a public blob, and return a proper error in that situation rather than a struct with unhelpful NULLs in. check-in: 6f71c3af5a user: simon tags: trunk
14:34
Make modinv able to return NULL if its inputs are not coprime, and check for that return value everywhere it is used. check-in: 81126a7cf8 user: simon tags: trunk
14:34
Avoid trying to take the modular inverse of zero in response to a sufficiently silly DSA signature. check-in: ea82957c5a user: simon tags: trunk
14:33
Another couple of memory leaks. check-in: e901ff1b64 user: simon tags: trunk
14:33
More consistently defend against division by zero with assertions. We now check that all the modular functions (modpow, modinv, modmul, bigdivmod) have nonzero moduli, and that modinv also has a nonzero thing to try to invert. check-in: 1d79e0227d user: simon tags: trunk
14:33
Validate newly created DSA keys more carefully. Don't want a structure half-filled with null pointers. check-in: c783761d06 user: simon tags: trunk
14:33
Remove some redundant null-pointer checks from code that must have been written before I wrote a never-failing snew. check-in: ee86c225d3 user: simon tags: trunk
14:33
Sanitise freeing of DSA keys. check-in: ff56f110f0 user: simon tags: trunk
14:32
Reinstate a piece of code accidentally removed in r9214, where Windows PuTTY does not trim a colon suffix off the hostname if it contains _more than one_ colon. This allows IPv6 literals to be entered. (Really we need to do a much bigger revamp of all uses of hostnames to arrange that square-bracketed IPv6 literals work consistently, but this at least removes a regression over 0.62.) check-in: 6a08410fec user: simon tags: trunk
2013-08-02
17:33
Raise the default scrollback from 200 to 2000 lines. The former was not so silly in the 1990s and before I implemented scrollback compression, but it's been a ridiculously low default for a while now. check-in: 9dde867cfc user: simon tags: trunk
14:51
Found a lot of places in sshbn.c where for-loops zeroing out memory just before freeing it really ought to be smemclrs. check-in: 911c0d2c25 user: simon tags: trunk
01:28
Verify RSA keys created by rsa2_openssh_createkey. check-in: d3496c3c83 user: simon tags: trunk
01:28
Replace some 'sfree' calls of bignums with the proper 'freebn'. check-in: 1dd02ecbaf user: simon tags: trunk
01:27
Add some missing bounds checks in signature verification routines. check-in: 0b92b855f5 user: simon tags: trunk
01:27
Fix an array-size bug in modmul, and add some tests for it. check-in: 9061bc28f3 user: simon tags: trunk
2013-07-29
12:47
Remove one of the frees added in r9916. stat_name points to somewhere within the same string that destfname points to the start of, so freeing it causes at best a double-free of destfname and more likely a free of something that isn't even the start of an allocated block. check-in: f6693a7219 user: simon tags: trunk
2013-07-27
13:35
Add an assortment of missing consts I've just noticed. check-in: 9388e0e1ae user: simon tags: trunk
2013-07-24
14:18
Get rid of the variable 'advapi' in Pageant's WinMain, which was never actually used for anything sensible and could have been freed while containing nonsense at program end. check-in: 216d70f276 user: simon tags: trunk
2013-07-22
14:56
Back out r9964. I wasn't paying attention: every control is in the byid tree but not all of them are in the byctrl tree. check-in: 3eb328f003 user: simon tags: trunk
14:56
Add a bob script to do Coverity scanning. check-in: 534a54bd61 user: simon tags: trunk
14:55
Fix a few more memory and resource leaks. check-in: 9b3e8c1465 user: simon tags: trunk
14:55
Remove the variable 'bufused', which came over from winnet.c in mistaken cut and paste and is just a bug. check-in: b3b80590c1 user: simon tags: trunk
02:12
Increase FONT_MAXNO from 0x2f to 0x40, to ensure the fonts[] array includes every possible combination of the font bitfields, in particular ATTR_OEM|ATTR_NARROW. check-in: 6eed22fa7a user: simon tags: trunk
02:12
Correct an inequality sign causing the bounds check in Windows palette_set() to be bogus. Fortunately, this isn't exploitable through the terminal emulator, because the palette escape sequence parser contains its own bounds check before even calling palette_set(). While I'm at it, fix the same goof in the OS X version! That port is more or less abandoned, but that's no excuse for leaving obviously wrong code lying around. check-in: eb7d5a10e2 user: simon tags: trunk
02:12
Missing assert. check-in: 7ab72cb74f user: simon tags: trunk
02:12
Replace the type-checking COMPTR macro with my current idea of best practice in type-check macros. check-in: 6231caddfe user: simon tags: trunk
02:12
Add missing casts in arguments to ctype functions. check-in: 2ca4f7724b user: simon tags: trunk
02:12
Rationalise null pointer checks in both decode_codepage functions, so that decode_codepage(NULL) and decode_codepage("") both return the default character set. check-in: 52a52f87c4 user: simon tags: trunk
02:11
Fix a double error handling goof in the winstore side of the jump list support: transform_jumplist_registry should give its caller dynamically allocated data if and only if it returns JUMPLISTREG_OK, and get_jumplist_registry_entries should test the return value against JUMPLISTREG_OK rather than a value from a totally different enum. check-in: 4308431bba user: simon tags: trunk
02:11
Another big batch of memory leak fixes, again mostly on error paths. The most interesting one is printer_add_enum, which I've modified to take a char ** rather than a char * so that it can both realloc its input buffer _and_ return NULL to indicate error. check-in: c3f3ee12f4 user: simon tags: trunk
02:11
Add a missing null pointer check in one of the dialog box functions. check-in: 3a9b6d22d8 user: simon tags: trunk
02:11
Report an error if deleting a random seed file fails. (This has also required me to add a currently unused nonfatal() to PuTTYgen, since although PuTTYgen won't actually try to delete putty.rnd, it does link in winstore.c as a whole.) check-in: 8954381522 user: simon tags: trunk
02:11
Invent a win_strerror() function which behaves as much like Unix strerror as I can arrange, wrapping up all the ugly FormatMessage nonsense and caching previously looked-up messages for reuse so that callers can treat them as static. check-in: 608a3a3766 user: simon tags: trunk
02:11
Rework keylist_update() to fix both a buffer-size limitation and a memory leak. check-in: 91560392b8 user: simon tags: trunk
2013-07-21
06:01
Initialise 'psa' to NULL on every code path in the Pageant client code, fixing a potential segfault when compiling with -DNO_SECURITY. check-in: 3f060d2ca9 user: simon tags: trunk
05:12
If the SSH server sends us CHANNEL_CLOSE for a channel on which we're sitting on a pile of buffered data waiting for WINDOW_ADJUSTs, we should throw away that buffered data, because the CHANNEL_CLOSE tells us that we won't be receiving those WINDOW_ADJUSTs, and if we hang on to the data and keep trying then it'll prevent ssh_channel_try_eof from sending the CHANNEL_EOF which is a prerequisite of sending our own CHANNEL_CLOSE. check-in: 127cf34c50 user: simon tags: trunk
04:16
Add '.so' to the list of file extensions cleared up by 'make clean' in Makefile.cyg, since if you're building against Winelib it will generate one of those alongside each .exe file. check-in: 3c11ddd270 user: simon tags: trunk
02:40
Completely remove the 'frozen_readable' mechanism from uxnet.c. It parallels a similar mechanism in winnet.c and came over by copy and paste, but is pointless in the Unix networking API. On Windows, if you're using a mechanism such as WSAAsyncSelect which delivers readability notifications as messages rather than return values from a system call, you only get notified that a socket is readable once - it remembers that it's told you, and doesn't tell you again until after you've done a read. So in the case where we intentionally stop reading from a socket because our local buffer is full, and later want to start reading again, we do a read from the socket with MSG_PEEK set, and that clears Windows's flag and tells it to start sending us readability notifications again. On Unix, select() and friends didn't do anything so strange in the first place, so the whole mechanism is unnecessary. check-in: 6c0335a94e user: simon tags: trunk
02:40
Fix error checking in uxstore.c: add a missing check, and fix a mis-cut-and-pasted one. check-in: ef3d2b4788 user: simon tags: trunk
02:40
When I turned fcntls into noncloexecs in r9940, I missed one. check-in: c138704d7f user: simon tags: trunk
02:40
Two more memory leak fixes, on error paths I didn't spot in r9919. check-in: fd4c3490f1 user: simon tags: trunk
2013-07-20
08:15
Fix a null-dereference introduced by another mis-fix in r9919. check-in: f1918a54f9 user: simon tags: trunk
08:15
Fix leak of 'fname' introduced by the rewrite of write_random_seed in r9933. check-in: e9b29537b5 user: simon tags: trunk
08:15
Another two mis-fixes from r9919: when we sfree(line) on exit from the ssh.com and OpenSSH key import loops, we should also null it out so that the cleanup path doesn't try to re-free the same pointer. check-in: 987177cbd7 user: simon tags: trunk
08:15
Redo a mis-fix of a memory leak in r9919: I added sfree(data) immediately after conf_deserialise in the Duplicate Session receiver, whereas I should have put it after the subsequent loop that extracts the pty argv if any. check-in: 3f9156f8b5 user: simon tags: trunk
06:31
Switch to translating keystrokes using ToUnicodeEx rather than ToAsciiEx, where possible. This enables support for keys which generate Unicode characters that aren't in the system code page, which seems to me like a perverse way for Windows to have set up the system code page but apparently does happen, e.g. (I'm told) U+0219 and U+021B on Romanian keyboards. Patch mostly due to Andrei Damian-Fekete. check-in: 14d0fea887 user: simon tags: trunk
03:34
Been meaning to get round to this for a while: use CryptGenRandom to gather extra entropy at Windows PuTTY startup time. (It's only used as one of the inputs to PuTTY's internal entropy pool, so nobody is required to trust it.) check-in: 47054fafef user: simon tags: trunk
2013-07-19
13:10
Centralise calls to fcntl into functions that carefully check the error returns. check-in: 04c7a24906 user: simon tags: trunk
12:45
Add an error check to every setsockopt call in uxnet.c. check-in: 9121a6c35f user: simon tags: trunk
12:44
Add some conditionally-compilable diagnostics to the RNG. I got briefly worried that it might not be doing what I thought it was doing, but examining these diagnostics shows that it is after all, and now I've written them it would be a shame not to keep them for future use. check-in: 24255e01ac user: simon tags: trunk
12:44
Better error reporting when failing to save a session. check-in: 2e61d87342 user: simon tags: trunk
12:44
Add some missing calls to cleanup_exit. check-in: 8f4562c3b3 user: simon tags: trunk
12:44
Run the random pool setup and teardown functions with random_active nonzero rather than zero. check-in: 412920de82 user: simon tags: trunk
12:44
Report errors in store_host_key too. check-in: 690915520f user: simon tags: trunk
12:44
Add proper error reports in write_random_seed, via the new 'nonfatal' error reporting function. check-in: 9fe9012e9a user: simon tags: trunk
12:44
Add a nonfatal() function everywhere, to be used for reporting things that the user really ought to know but that are not actually fatal to continued operation of PuTTY or a single network connection. check-in: ad8c919057 user: simon tags: trunk
12:44
Add a missing error check in pterm's child-process setup. Shouldn't really fail, but might as well be careful. check-in: e86c47be22 user: simon tags: trunk
12:44
It suddenly strikes me as probably a good idea to enforce that anyone calling random_byte has previously called random_ref. (I'm not aware of any current code getting this wrong! It just seems to me to be the sort of thing you'd want to be really sure of.) check-in: 001c304e9e user: simon tags: trunk
2013-07-15
01:40
Fix a build failure: r9924 thoughtlessly put an assert before some declarations, and gcc didn't complain but VC did. check-in: 6ced7110ac user: simon tags: trunk
2013-07-14
12:08
In the various channel request mini-coroutines, replace crWaitUntilV(pktin) with plain crReturnV, because those coroutines can be called back either with a response packet from the channel request _or_ with NULL by ssh_free meaning 'please just clean yourself up'. check-in: f0f597f3a9 user: simon tags: trunk
05:46
Remove a redundant while-loop condition when reading RFC822-style header text from a PuTTY key file. (It's silly to have both while (len > 0) at the top of the loop _and_ an if (len == 0) return in the middle, and in fact the former was the erroneous one since it would have prohibited a 39-character header, which I intended to be permitted.) check-in: 09fe2439b4 user: simon tags: trunk
05:46
Remove a pointless assignment in setup_config_box. check-in: 6e56f8bdd7 user: simon tags: trunk
05:46
Remove a return path from sshcom_write() which was both unreachable (it would trigger if !type==RSA and !type==DSA, but one of those must have been true to get there in the first place) and erroneous (it would return NULL without going through the cleanup code). Since the code's internal structure guarantees that path isn't reached, replace it with an assert. check-in: e3ab162905 user: simon tags: trunk
05:46
Use the new ctrl_alloc_with_free to clean up a long-standing FIXME in the session saving code, in which the contents of the edit box giving the current saved session name was stored in a horrid place with a fixed length. Now it's dangling off sessionsaver_data as it always ought to have been, and it's dynamically reallocated to the appropriate length, and there's a free function that cleans it up at the end of the dialog's lifetime. check-in: c522783586 user: simon tags: trunk
05:46
Add an extended version of ctrl_alloc which permits you to provide a custom free function, in case you need to ctrl_alloc a structure which then has additional dynamically allocated things dangling off it. check-in: 33b7a596f1 user: simon tags: trunk
05:46
Move the calculation of the exchange hash to above the various warnings about insecure crypto components. The latter may crReturn (though not in any current implementation, I believe), which invalidates pktin, which is used by the former. check-in: ea02e2be18 user: simon tags: trunk
05:46
Add a missing null pointer check in wc_unescape, to bring it in line with the usage comment saying you're allowed to pass NULL to find out only the return value. No caller actually does pass NULL at the moment. check-in: a957fdbc03 user: simon tags: trunk
05:46
Fix another giant batch of resource leaks. (Mostly memory, but there's one missing fclose too.) check-in: 17fb711a78 user: simon tags: trunk
05:45
Tighten up a lot of casts from unsigned to int which are read by one of the GET_32BIT macros and then used as length fields. Missing bounds checks against zero have been added, and also I've introduced a helper function toint() which casts from unsigned to int in such a way as to avoid C undefined behaviour, since I'm not sure I trust compilers any more to do the obviously sensible thing. check-in: 845f59bde8 user: simon tags: trunk
05:45
Fix an always-false if statement which was causing the window border not to be redrawn when the user reconfigured the background colour. check-in: 93e0d8851c user: simon tags: trunk
2013-07-11
12:43
Add an assortment of missing frees, and one missing file close. Mostly on error paths, although the one in PSFTP's wildcard_iterate will come up in normal usage. check-in: 9c97222ada user: simon tags: trunk
12:24
xfer_{up,down}load_gotpkt free their input sftp_packet as a side effect of handling it, but they do not free it if it isn't a packet they recognise as part of their upload/download. Invent a return value that specifically signals this, and consistently free pktin at every call site if that return value comes back. Also, ensure that that return value also always comes with something meaningful in fxp_error. check-in: 1129bffc22 user: simon tags: trunk
12:24
Fix a collection of calls to tell_user so that they don't add their own newline before the one tell_user puts on the end anyway. Also, while I'm here, make up my mind about whether to prefix messages with "scp:" or "pscp:" - I choose the latter. check-in: 3646f99667 user: simon tags: trunk
12:24
Fix a couple of code paths on which, if fxp_readdir returned an error, we would return without first closing the directory handle we had used as an argument. check-in: 1ab7f878e5 user: simon tags: trunk
12:24
It's not actually legal by the C standard to call qsort with a null array pointer, _even_ if you're asking it to sort zero elements so that in principle it should never dereference that pointer. Fix the four instances in PSCP/PSFTP where this was previously occurring. check-in: ff4be3ebbd user: simon tags: trunk
12:24
Fixes for the tree234 unit test: break its dependencies on half of the rest of PuTTY, and fix a couple of format string type mismatches pointed out by gcc. check-in: cf3e080e5e user: simon tags: trunk
12:24
Add missing checks in update_for_intended_size() in the font selector code, which would have coped badly if ever asked to select the first font in the list at a size smaller than it supported. Luckily the first font tended to be one of the X numeric aliases (e.g. 10x20) which was stored with size zero, so this probably didn't actually come up for anyone, but better safe than sorry. check-in: 60326f8cd5 user: simon tags: trunk
12:24
Fix a pty-freeing error which caused a segfault if you attempted to use Restart Session in a post-not-close-on-exit pterm. check-in: c15206d980 user: simon tags: trunk
12:24
Add some missing null checks for inst->ldisc, which were causing segfaults if a PuTTY or pterm did not close on exit and then you either typed something via input_method_commit_event or changed the line editing or echo settings. check-in: 4d69ee0b39 user: simon tags: trunk
12:24
Remove another pointless null check, this time of inst->back in the function which has just dereferenced it to get the exit code. check-in: dea3c6f18f user: simon tags: trunk
12:24
Remove redundant null checks for arguments to sftp_{get,put}_file which are (a) never NULL anyway, and (b) have already been dereferenced by the time we make those checks so it would be too late if they were. check-in: d149b789c1 user: simon tags: trunk
12:24
Fix a mishandling of error returns from makekey() in the SSH-1 private key loader. check-in: f9896207f1 user: simon tags: trunk
12:24
Add another missing bounds check in the SSH-1 private key loader. check-in: 317faf983e user: simon tags: trunk
12:23
Get rid of the fixed-size 'hostname' buffer in every port-forwarded connection, and replace it with sensible dynamically allocated storage. While I'm at it, get rid of the disgusting dual use between storing an actual hostname and storing an incoming SOCKS request; we now have a separate pointer variable for each. check-in: 030782147d user: simon tags: trunk
2013-07-08
17:36
Add an assortment of extra safety checks. check-in: 6094a73041 user: simon tags: trunk
2013-07-07
09:34
Move the SSH-1 servkey and hostkey variables into the coroutine state, since there is a theoretical code path (via the crReturn loop after asking an interactive question about a host key or crypto algorithm) on which we can leave and return to do_ssh1_login between allocating and freeing those keys. (In practice it shouldn't come up anyway with any of the current implementations of the interactive question functions, not to mention the unlikelihood of anyone non-specialist still using SSH-1, but better safe than sorry.) check-in: 86e974bb0e user: simon tags: trunk
2013-07-06
15:43
Clean up handling of the return value from sftp_find_request. In many places we simply enforce by assertion that it will match the request we sent out a moment ago: in fact it can also return NULL, so it makes more sense to report a proper error message if it doesn't return the expected value, and while we're at it, have that error message whatever message was helpfully left in fxp_error() by sftp_find_request when it failed. To do this, I've written a centralised function in psftp.c called sftp_wait_for_reply, which is handed a request that's just been sent out and deals with the mechanics of waiting for its reply, returning the reply when it arrives, and aborting with a sensible error if anything else arrives instead. The numerous sites in psftp.c which called sftp_find_request have all been rewritten to do this instead, and as a side effect they now look more sensible. The only other uses of sftp_find_request were in xfer_*load_gotpkt, which had to be tweaked in its own way. While I'm here, also fix memory management in sftp_find_request, which was freeing its input packet on some but not all error return paths. check-in: 14608d0542 user: simon tags: trunk
2013-07-01
12:56
A collection of small bug fixes from Chris West, apparently spotted by Coverity: assorted language-use goofs like freeing the wrong thing or forgetting to initialise a string on all code paths. check-in: 8962699297 user: simon tags: trunk
2013-06-15
14:58
Fallback for manual setup of GTK 1, if autoconf is run on a system where the GTK1 detection function AM_PATH_GTK hasn't been provided by /usr/share/aclocal/gtk.m4 or equivalent. (Systems without gtk.m4 are becoming more common, but on the other hand I know at least one person is still using GTK 1 PuTTY since the 0.62 release.) check-in: 49e7e064b7 user: simon tags: trunk
2013-05-28
18:46
Update docs for change to UTF-8 by default, and emphasise UTF-8 more generally. check-in: b8be4d7768 user: jacob tags: trunk
2013-05-25
09:03
It's probably well past time for this: change PuTTY's default character set configuration to UTF-8, on both Windows and Unix, and reorganise the dropdown lists in the Translation menu so that UTF-8 appears at the top (and Unix's odd "use font encoding" is relegated to the bottom of the list like the special-purpose oddity it is). check-in: 120fc17374 user: simon tags: trunk
2013-03-10
06:04
Fix a bug in which terminal output received from the session could be buffered in terminal.c indefinitely and only released when further output turned up. Arose because we suppress the call to term_out from term_data if a drag-select is in progress, but when the drag-select ends we weren't proactively calling term_out to release the buffered data. So if your session generated some terminal output while you were in mid-select, _and had stopped by the time you let go of the mouse button_, then the output would just sit there until released by the next call to term_data. check-in: d49eb034df user: simon tags: trunk
2013-02-24
13:28
Remove the half-hearted attempt to make the utmp helper process drop privileges just before dying of a fatal signal. I'm not sure what I intended it for in the first place; it certainly isn't doing its job properly (no setgid), it's causing compiler warnings due to not checking the setuid return code, and we can't think of any useful purpose for it. check-in: 9613910863 user: simon tags: trunk
2013-02-23
15:00
Don't forget to check the return values of setuid and friends. check-in: 37c4284d89 user: simon tags: trunk
2013-02-22
15:39
Give a better error message if a PuTTY private key file has a version number we don't understand. It's nicer to report 'format too new' than 'not a PuTTY key file'. check-in: 4b9de581eb user: simon tags: trunk
2013-02-20
17:30
Add support for HMAC-SHA-256 as an SSH-2 MAC algorithm ("hmac-sha2-256") as specified in RFC 6668. This is not so much because I think it's necessary, but because scrypt uses HMAC-SHA-256 and once we've got it we may as well use it. Code very closely derived from the HMAC-SHA-1 code. Tested against OpenSSH 5.9p1 Debian-5ubuntu1. check-in: 6c7bd4523b user: ben tags: trunk
16:37
Take advantage of PUT_32BIT_MSB_FIRST when constructing sequence numbers to MAC. check-in: bb6f590302 user: ben tags: trunk
2013-01-23
16:59
Patch from Egmont Koblinger to implement two extended variants of xterm mouse tracking, both supported by the current up-to-date xterm (288). They take the form of two new DEC terminal modes, 1006 and 1015, which do not in themselves _enable_ mouse tracking but they modify the escape sequences sent if mouse tracking is enabled in the usual way. check-in: ff6decabd1 user: simon tags: trunk
2013-01-19
11:17
Adjust comments around split_into_argv() to clarify that it's not *Windows's* command-line splitting rules we're mimicking here; it's VC7's, and they're not the same as VC10's. check-in: 7c2172bd62 user: simon tags: trunk
2013-01-13
15:59
Reorganise setup_fonts_ucs so that in case of error it does nothing and returns its error message as a string, instead of actually printing it on standard error and exiting. Now we can preserve the previous error behaviour when we get a nonexistent font name at startup time, but no longer rudely terminate in mid-session if the user configures a bogus font name in Change Settings. check-in: 6389889576 user: simon tags: trunk
2013-01-07
13:08
Move the -I options for all our source subdirectories out of AM_CFLAGS and into AM_CPPFLAGS. This is more conceptually sensible according to my reading of the automake manual, and also has the specific desirable effect that they move to the front of the command line, ahead of any 'system' type -I options that autoconf might have felt a need for. A user reported that autoconf had added -I/usr/local/include to their command line for the sake of a required header file, but their /usr/local/include also turned out to include a thing called 'proxy.h' (from libproxy, nothing to do with us) which shadowed our own proxy.h and caused a build failure. This should fix that. check-in: eae4114b11 user: simon tags: trunk
2012-12-22
12:10
Update the suggested compile command in sshbn.c's test rig. check-in: f28105b8ef user: simon tags: trunk
12:09
Fix two gcc warnings about confused printf format strings in the bignum code's test harness. Thanks to Sup Yut Sum for fixing this in TortoisePlink and Sven Strickroth for bringing it to my attention. check-in: 06a991e499 user: simon tags: trunk
03:40
Ronald Landheer-Cieslak points out that the various back ends which treat all socket closures as clean exits (because the protocol doesn't provide for transferring a process exit code) could usefully at least treat _socket errors_ as unclean exits. Patch the Telnet, Rlogin and Raw backends to retain that information and return INT_MAX to the frontend. I wasn't sure whether it was better to solve this by modifying each affected frontend, or each affected backend. I chose the latter, but neither is really ideal; this is the sort of thing that makes me wish we had a piece of fixed middleware in between, independent of both platform and protocol. check-in: 77d1fb6713 user: simon tags: trunk
2012-12-18
03:19
Switch round a bogus if statement I've just noticed. Both the write to pty_utmp_helper_pipe _and_ the close of it if we're not going to write should be conditionalised on the pipe existing, rather than just the former! check-in: 21f0ce4047 user: simon tags: trunk
03:02
Patch from Brad Smith to use posix_openpt() instead of open("/dev/ptmx"), where the former is available. Improves portability, since at least one OS (OpenBSD) supports the POSIX pty functions but does it via an underlying mechanism which doesn't involving having a /dev/ptmx. check-in: ab7860768b user: simon tags: trunk
03:02
Use O_NOCTTY (if available) when opening /dev/ptmx, just in case any OS doesn't automatically assume it. (It would seem faintly weird to me - surely opening the master end of a given pty is a fairly good indication that you're _not_ a process running inside it which wants to have it available as /dev/tty! But you never know...) check-in: 66ab5269a3 user: simon tags: trunk
2012-12-17
02:40
Add a bounds check in the word-by-word selection code to prevent attempting to call lineptr() with a y-coordinate off the bottom of the screen and triggering the dreaded 'line==NULL' message box. This crash can only occur if the bottommost line of the screen has the LATTR_WRAPPED flag set, which as far as I can see you can only contrive by constructing a LATTR_WRAPPED line further up the screen and then moving it down using an insert-line escape sequence. That's probably why this bug has been around forever without anyone coming across it. check-in: bb260df3df user: simon tags: trunk
2012-12-04
14:53
Patch from Hideki Eiraku to make PuTTY call GetScrollInfo, so it can use 32-bit scrollbar position data instead of being limited to the 16-bit version that comes in scrollbar messages' wParam. check-in: 765fc74497 user: simon tags: trunk
2012-11-14
12:32
Fix another error-reporting bug, in which sk_newlistener would fail to capture the error code if listen() returned an error, and instead pass 0 (saved from the previous successful bind) to winsock_error_string. check-in: 33092169d8 user: simon tags: trunk
2012-11-13
15:34
When manually initialising a 'struct RSAKey' due to loading an SSH1 public key but not the private half, NULL out all the CRT-optimisation fields as well as the private exponent pointer. Otherwise segfaults - security-harmless, but annoying - can happen in freersakey() when we notice they aren't null and try to free them. check-in: 90444c9e7e user: simon tags: trunk
12:36
Add a fallback case to winsock_error_string() which makes it call FormatMessage to get the OS's text for any error not in our own translation table. Should eliminate the frustrating 'unknown error'. (I haven't chosen to use FormatMessage unconditionally, because it comes out with enormous messages along the lines of "No connection could be made because the target machine actively refused it" in place of "Connection refused" and I'm Unixy enough to prefer the latter. Also, on older Windowses, Winsock error codes are in a separate API segment and don't work with FormatMessage anyway.) check-in: 33c1180299 user: simon tags: trunk
2012-10-17
15:48
Windows's sk_address_is_local() was returning the wrong answers for IPv6 addresses, because I'd mistakenly cast an ai_addr to the low- level 'struct in6_addr' instead of the correct 'struct sockaddr_in6'. check-in: 0402f2fd06 user: simon tags: trunk
2012-10-16
15:15
When a proxy negotiation function is called with PROXY_CHANGE_NEW, it should not call plug functions, because it's being called from within new_connection(), and the state on which the plug functions depend will not have been set up until new_connection() returns success. Instead, we set the error string in the Proxy_Socket, which will cause the same error message to be returned as a failure of new_connection(). check-in: c50d00af6f user: simon tags: trunk
15:15
If you configure Unix PuTTY to use a proxy, tell it to even proxy localhost connections, and also enable X forwarding in such a way that it will attempt to connect to a Unix-domain X server socket, an assertion will fail when proxy_for_destination() tries to call sk_getaddr(). Fix by ensuring that Unix-domain sockets are _never_ proxied, since they fundamentally can't be. check-in: fbf994f8bf user: simon tags: trunk
2012-10-10
13:32
Add timestamps to the 'SSH raw data' logging mode. check-in: fcbd3f6f44 user: simon tags: trunk
13:29
A user points out that we should free the 'hProcess' and 'hThread' handles returned in the PROCESS_INFORMATION structure after we call CreateProcess. check-in: 4091a039e9 user: simon tags: trunk
2012-10-02
14:31
Sumudu Fernando points out that in the big r9214 destabilisation I mistakenly rearranged the logic in an if statement in window.c, with the effect that scroll-wheel events are no longer sent via xterm mouse tracking. Put it back to the way it was. check-in: db702f5b14 user: simon tags: trunk
2012-09-23
10:36
Clip the 'lines' parameter to scroll() at the size of the scroll window. scroll() iterates that many times, so this prevents a tedious wait if you give a very large parameter to ESC[L or ESC[M, for example. A side effect is that very large requests for upward scrolling in a context that affects the scrollback will not actually wipe out the whole scrollback: instead they push just the current lines of the screen into the scrollback, and don't continue on to fill it up with endless boring blank lines. I think this is likely to be more useful in general, since it avoids wiping out lots of useful scrollback data by mistake. I can imagine that people might have been using it precisely _to_ wipe the scrollback in some situations, but if so then they should use CSI 3 J instead. check-in: ebe1a34984 user: simon tags: trunk
2012-09-19
17:17
Windows PSFTP has two places that call run_timers and I'd only updated one of them. Correct that. check-in: 3119e5baf3 user: ben tags: trunk
17:16
Fix indentation mess in my timing overhaul. check-in: c172782c0b user: ben tags: trunk
17:12
Fix a stupid sign bug in run_timers() that broke Windows Plink (and should really have broken everything else too). check-in: f22d9bc132 user: ben tags: trunk
12:08
Make --help and --version work consistently across all tools. Well, at least across all command-line tools on both Windows and Unix, and the GTK apps on Unix too. The Windows GUI apps fundamentally can't write to standard output and it doesn't seem sensible to use message boxes for these purposes :-) check-in: 75423b66a5 user: simon tags: trunk
2012-09-18
18:07
Better document the various environments with which Makefile.cyg works. check-in: 4f5cf307a3 user: ben tags: trunk
18:05
Add a new COMPAT option for environments lacking SecureZeroMemory(), rather than explicitly checking for Winelib. It seems that w32api is lacking it as well. check-in: b814cb52ab user: ben tags: trunk
16:50
Allow remote-to-local forwardings to use IPv6. RFC 4245 section 7.1 specifies the meaning of the "address to bind" parameter in a "tcpip-forward" request. "0.0.0.0" and "127.0.0.1" are specified to be all interfaces and the loopback interface respectively in IPv4, while "" and "localhost" are the address-family-agnostic equivalents. Switch PuTTY to using the latter, since it doesn't seem right to force IPv4. There's an argument that PuTTY should provide a means of configuring the address family used for remote forwardings like it does for local ones. check-in: f6fa69cf31 user: ben tags: trunk
16:42
Two related changes to timing code: First, make absolute times unsigned. This means that it's safe to depend on their overflow behaviour (which is undefined for signed integers). This requires a little extra care in handling comparisons, but I think I've correctly adjusted them all. Second, functions registered with schedule_timer() are guaranteed to be called with precisely the time that was returned by schedule_timer(). Thus, it's only necessary to check these values for equality rather than doing risky range checks, so do that. The timing code still does lots that's undefined, unnecessary, or just wrong, but this is a good start. check-in: a2d79b9e07 user: ben tags: trunk
2012-09-17
17:28
Quell a (correct) GCC warning in the NO_HTMLHELP case. check-in: 26974b0b75 user: ben tags: trunk
2012-09-13
18:00
Should have been part of r9663: do use the platform-independent version of smemclr when compiling with Winelib. check-in: 55418d7f9a user: ben tags: trunk
17:34
Tweak comment in Recipe that had become separated from its code. check-in: 1728fb86ce user: ben tags: trunk
17:34
Don't try to use SecureZeroMemory under Winelib, since it isn't available there (yet). check-in: 9576fab1e6 user: ben tags: trunk
17:33
Define SECURITY_WIN32 for Winelib/Cygwin builds as well as for VC. This should perhaps go into winmisc.c: it's caused problems for other people too: <http://stackoverflow.com/questions/8530159/vs2010-build-error-at-putty-source> check-in: a1328977bc user: ben tags: trunk
16:53
In the cygwin Makefile, use "-o" on the windres command line to specify the output file. This appears to be supported by windres, and is required by wrc (the Winelib resource compiler). check-in: 8ed9ff86c4 user: ben tags: trunk
2012-09-08
14:46
Most of the code for "nc" mode duplicated that for opening a session or a fowarded port. Arrange that this code is shared instead. The main visible change is a slight change of log messages. check-in: 45e5597a72 user: ben tags: trunk
05:40
Hiroshi Oota points out that PuTTY's agent forwarding sockets can get confused if they receive a request followed by immediate EOF, since we currently send outgoing EOF as soon as we see the incoming one - and then, when the response comes back from the real SSH agent, we send it along anyway as channel data in spite of having sent EOF. To fix this, I introduce a new field for each agent channel which counts the number of calls to ssh_agentf_callback that are currently expected, and we don't send EOF on an agent channel until we've both received EOF and that value drops to zero. check-in: 18cc9933bb user: simon tags: trunk
2012-09-01
07:28
Factor out some common code for constructing SSH2_CHANNEL_OPEN. check-in: a820fa2f7d user: ben tags: trunk
07:10
struct winadj is unused now. G/c it. check-in: 215a9bd3fa user: ben tags: trunk
07:03
All of the initial CHANNEL_REQUESTs are conditional on (ssh->mainchan && !ssh->ncmode), so bundle them up in a big block conditional on this rather than checking it five times. check-in: 7cd9f82d83 user: ben tags: trunk
06:32
do_ssh2_authconn() now installs the standard handlers for CHANNEL_SUCCESS and CHANNEL_FAILURE as soon as it's opened a channel, so there's no need for it to set them again later. check-in: 3f43707fed user: ben tags: trunk
2012-08-30
13:48
Memory leak fixes reported by Balazs Domjan. check-in: 837bb0029b user: simon tags: trunk
13:44
Rename the various ssh2_maybe_setup_* functions to ssh2_setup_*, and move the primary conditions out of them into their callers. Fixes a crash in 'plink -N', since those functions would be called with a NULL channel parameter and immediately dereference it to try to get c->ssh. check-in: 91489422bb user: simon tags: trunk
13:44
In openssh_read(), we shouldn't ever return SSH2_WRONG_PASSPHRASE for an unencrypted key. (The other import function, sshcom_read(), already got this right.) Thanks to David Wedderwille for the report. This is more than just an error-reporting mistake; it actually causes Windows PuTTYgen to tight-loop on attempting to load a corrupt OpenSSH key, because the 'wrong passphrase' return value causes the caller to loop round and try again, but of course it knows the key is unencrypted so it doesn't prompt for a different passphrase and just tries again with no change... check-in: eb33193237 user: simon tags: trunk
13:44
Avoid leaking file handles in load_openssh_key(), as reported by David Wedderwille. check-in: 4487093d6a user: simon tags: trunk
2012-08-28
12:42
Fix a controlling-terminal bug reported by Anthony Heading: Cygwin doesn't have TIOCSCTTY, so my attempt to set the ctty of the child process isn't doing anything, and only works by chance when you run bash because bash does the thing that _will_ set the ctty, namely opening the terminal file again without O_NOCTTY. So now we do that too. check-in: 2728617d96 user: simon tags: trunk
12:41
Partially revert r9636. It is true that we can directly return the result of memcmp, but untrue that we can do so _unconditionally_: if memcmp returns zero, we still need to fall through to the next comparison. check-in: 3bce939695 user: simon tags: trunk
2012-08-27
18:16
Clang, like LCC, objects to using '<' and '>' on function pointers. I'm not entirely sure that using memcmp() is any more defined by the C standard, but at least Clang doesn't complain about it. While I'm here, tree234 doesn't require that comparison functions return precisely +1 or -1, so we can use the return value of memcmp() directly. check-in: 59a02c549d user: ben tags: trunk
17:02
Change return type of do_ssh2_transport() to void. Nothing pays attention to it any more, anyway. check-in: 602c100aba user: ben tags: trunk
16:55
Make bombout() less of a macro and more of a function. This gives GCC slightly fewer opportunities to gratuitously inflate its output. check-in: e1f8ba8e7b user: ben tags: trunk
14:11
Fix a memory leak in parse_ttymodes() (found by Memcheck/Valgrind). check-in: f3232e6fc3 user: ben tags: trunk
13:44
Slightly simplify crFinishFree{,V}. They're only likely to be useful for freeing a coroutine state structure, in which case there's no need to reset the line number (since all such coroutines keep their line number in the state structure) and the state structure pointer is always called "s". check-in: fd2ca901e3 user: ben tags: trunk
12:37
Don't close SSH-2 channels with outstanding channel requests on local error. In sshfwd_unclean_close(), get ssh2_check_close() to handle sending SSH_MSG_CHANNEL_CLOSE. That way, it can hold off doing so until any outstanding channel requests are processed. Also add event log message for unclean channel closures. check-in: 8f16c188ed user: ben tags: trunk
09:34
It's not legal to free a coroutine's state structure before invoking crFinish or crFinishV, since they will attempt to write to the coroutine state variable contained in that structure. Introduced some new all-in-one macros crFinishFree and crFinishFreeV, and used those instead. Should fix today's report of a crash just after authentication. check-in: edfebde5a7 user: simon tags: trunk
2012-08-26
04:50
Fix markup error introduced in r9626. check-in: 2f63c751c5 user: jacob tags: trunk
04:19
Remove documentation for "Out of space for port forwardings" error. It no longer exists in the code, and should have been obsoleted by r9214 at the latest. check-in: 188ae2adc3 user: ben tags: trunk
2012-08-25
17:57
Improve window-size handling in Unix Plink. Unconditionally override the configured terminal size with the one from stdin if it's available. This avoids the silliness whereby if Default Settings had a terminal size set, Plink used this and thus caused the server to use the wrong size. check-in: 102e90f6af user: ben tags: trunk
16:06
Better handling of outstanding CHANNEL_REQUESTS on channel destruction. Part the first: make sure that all structures describing channel requests are freed when the SSH connection is freed. This involves adding a means to ask a response handler to free any memory it holds. Part the second: in ssh_channel_try_eof(), call ssh2_channel_check_close() rather than emitting an SSH_MSG_CHANNEL_EOF directly. This avoids the possibility of closing the channel while a CHANNEL_REQUEST is outstanding. Also add some assertions that helped with tracking down the latter problem. check-in: c87aa624ea user: ben tags: trunk
10:57
Factor out common code to construct CHANNEL_REQUESTS. This reduces code size a little and also makes it harder to accidentally request a reply without putting in place a handler for it or vice versa. check-in: 3182a9a27e user: ben tags: trunk
10:04
Simplify handling of responses to channel requests. The various setup routines can only receive CHANNEL_SUCCESS or CHANNEL_FAILURE, so there's no need for the to worry about receiving anything else. Strange packets will end up in do_ssh2_authconn instead. check-in: 054111be55 user: ben tags: trunk
09:34
Add some kind of window tracking to logparse.pl. check-in: c22f69b213 user: ben tags: trunk
08:54
Fix matching of channel and global requests with replies in logparse.pl. In each case, want_reply was being treated as true even when it wasn't, because it got decoded into "yes"/"no", both of which are true in Perl. check-in: 85c62a0921 user: ben tags: trunk
08:39
Handle all replies to CHANNEL_REQUESTs through the per-channel queue. Each of the minor start-of-session requests is now dealt with by its own little co-routine, while the shell/command is done in do_ssh2_authconn() itself. This eliminates one more round-trip in session setup: PuTTY gets all the way up to sending a shell request before worrying about any replies. check-in: f8eedbd544 user: ben tags: trunk
06:12
Generalise SSH_MSG_CHANNEL_{SUCCESS,FAILURE} handling. Now each channel has a queue of arbitrary handlers for those messages, with anything that sends a CHANNEL_REQUEST with want_reply true pushing a new entry onto the queue, and a shared handler that dispatches responses appropriately. Currently, this is only used for winadj@putty.projects.tartarus.org, but extending it to cover the initial requests as well shouldn't be too painful. check-in: 008c38a33f user: ben tags: trunk
2012-08-22
13:36
Fix a bug in the PSFTP command parser which would cause it to hallucinate an extra empty argument word at the end of a line if the line ended in more than one whitespace character. check-in: 07769e1daf user: simon tags: trunk
13:25
Enhance logparse.pl so that it detects channels running SFTP and decodes the SFTP message layer in addition to the underlying SSH. Requests and responses are matched up via their ids. check-in: 297ea2b807 user: simon tags: trunk
2012-08-21
18:04
Fix recently-introduced memory leak in ssh2_msg_unexpected(). check-in: 4d3163506d user: ben tags: trunk
17:33
De-duplicate code in KEXINIT generation. There's no need to have identical code generating server-to-client and client-to-server versions of the cipher and MAC lists; a couple of twice-around loops will do fine. check-in: 8a9f4acc01 user: ben tags: trunk
17:04
Reworking of packet delivery to coroutines in SSH-2. Before, NULL in the dispatch table meant "send to the appropriate one of do_ssh2_transport() and do_ssh2_authconn()". Now those (via small shims) are specified directly in the dispatch table, so ssh2_protocol() is much simpler. In the process, this has somewhat centralised the handling of gross server protocol violations. PuTTY will now disconnect with a rude message when (e.g.) OpenSSH sends us an SSH_MSG_UNIMPLEMENTED when we try to KEXINIT during authentication. check-in: 147d6fa6a9 user: ben tags: trunk
2012-08-19
06:35
Fix an erroneous "case" fallthrough in ssh1_msg_channel_close, which was causing assertion failures when closing X11 channels in SSH-1. Also fix another pasto. check-in: 4c44cc259a user: ben tags: trunk
2012-08-18
04:30
Tweak to SSH coroutine code: put line number in the coroutine state structure, which is consistent with Simon's canonical version of the macros. check-in: e5667a8d0d user: ben tags: trunk
2012-08-12
15:17
Use a single sftp_senddata() to send each SFTP packet, rather than using one for the length field and one for the rest of the packet contents. Since sftp_senddata() has no queuing or deferral mechanism but instead constructs and sends an SSH2_MSG_CHANNEL_DATA message immediately, this change has the effect of ceasing to split every SFTP packet across two SSH messages. check-in: 46ddd55b12 user: simon tags: trunk
2012-08-11
04:10
Rework bufchain code to allow for variable-sized granules. bufchain_add() now allocates at most one new granule. Granules still have a minimum size, so small adds still get coalesced. The main practical consequence of this is that PSCP and PSFTP now generate 4K SSH packets rather than 512-byte ones. Also, the compiled code (on my Ubuntu box) is fractionally smaller. check-in: ead74b235b user: ben tags: trunk
2012-08-02
17:18
Reduce the number of round-trips involved in opening an SSH-2 session by sending most of the initial SSH_MSG_CHANNEL_REQUEST messages before waiting for any replies. The initial version of this code was a clever thing with a two-pass loop, but that got hairy so I went for the simpler approach of separating the request and reply code and having flags to keep track of which requests have been sent. check-in: 5da2ce49e0 user: ben tags: trunk
2012-07-29
08:38
Add a missing \define I accidentally assumed was there in r9592. check-in: bb7c73258b user: simon tags: trunk
2012-07-28
14:30
Add a bug-compatibility flag to disable the winadj@putty.projects.tartarus.org request. Not currently enabled automatically, but should be usable as a manual workaround. check-in: feb44c7dcc user: simon tags: trunk
11:53
Fix an embarrassing mistake in config box handling which was causing changes to any SSH bug config option to be lost when the config box switched to a different panel, at least on GTK. check-in: 723e01c194 user: simon tags: trunk
11:33
Move the declaration of smemclr() out of putty.h into misc.h, because one of its uses (in sshaes.c) wasn't picking up the former. Thanks to Ubuntu's gcc for spotting that. check-in: b41c0f9a37 user: simon tags: trunk
11:33
Remove an unused variable. check-in: 5fca0480b8 user: simon tags: trunk
2012-07-22
14:51
Introduce a new utility function smemclr(), which memsets things to zero but does it in such a way that over-clever compilers hopefully won't helpfully optimise the call away if you do it just before freeing something or letting it go out of scope. Use this for (hopefully) every memset whose job is to destroy sensitive data that might otherwise be left lying around in the process's memory. check-in: aee68b8d31 user: simon tags: trunk
14:48
Remove a bashism in mksrcarc.sh, without which bob builds fail on Ubuntu (whose /bin/sh is not bash). check-in: 4aed111c79 user: simon tags: trunk
2012-07-18
23:42
Add '-Wall -Werror' to the compile options in the autotools makefile, having just noticed that Makefile.gtk had it and this one doesn't. (Of course, this being autoconf, we can easily enough make it conditional on the compiler actually being gcc.) check-in: b18fa86db2 user: simon tags: trunk
23:29
Rework the new type-check in sresize so that it doesn't cause a compile warning ('left-hand operand of comma expression has no effect'), which of course becomes fatal under -Werror. (This would have been instantly noticeable to people compiling with the old-fashioned Makefile.gtk, which does include -Wall -Werror, but those of us using the new autoconf makefile hadn't noticed.) check-in: e0cb545c71 user: simon tags: trunk
11:08
Remove term_key, which was intended to handle function keys in a cross- platform manner, but which nothing ever called. It thus served only to trap up the unwary. The live function key handling code lives in the frontends, i.e. window.c on Windows and gtkwin.c on Unix. check-in: ebca704008 user: owen tags: trunk
2012-07-11
13:12
If pterm's execvp fails when given the whole argument list after -e, and the argument list contains only one string, try again by passing that single string to "$SHELL -c" to be parsed as a shell command. This matches xterm's behaviour (as of xterm 261, at least), and means in practice that users can do _either_ of 'pterm -e some command' and 'pterm -e "some command"'. (A quick survey suggests that the majority of X terminal programs agree with pterm's old behaviour of only supporting '-e some command', except that gnome-terminal only supports the other behaviour and xterm supports both. With that disagreement, I think supporting both is probably the sensible thing.) check-in: 6530f824ce user: simon tags: trunk
2012-07-05
18:45
Turns out that the compose-keys fix in r9567 did in fact break one piece of keyboard handling: if Num Lock is on, numeric keypad keys are eaten by the IM, so we must avoid passing them to the IM in the first place if we're in any non-default numeric keypad mode (application or Nethack). This is a grubby way to do it, but the more obvious approach of just moving the Nethack and app-keypad if statements up to above the IM call doesn't work because those statements depend on the generic Alt-prefix handling that happens just _below_ the IM call. So instead I just repeat the list of keystrokes and modes in an if statement conditionalising the IM call. check-in: 7c3afb2e69 user: simon tags: trunk
2012-07-01
11:55
Stop including <gtk/gtkcontainer.h> directly, since a user points out that it'll be absent in GTK 3. check-in: 9858aaec38 user: simon tags: trunk
2012-06-20
12:39
John Hartnup reports that Apache SSHD's SFTP server responds to FXP_READDIR on an empty directory by returning a zero-length list of filenames, instead of the more common response of a list containing just "." and "..". Stop PSFTP failing an assertion when that happens. check-in: 36569ee0d2 user: simon tags: trunk
2012-06-18
13:10
Add the missing code to treat data coming from the input method as keypresses for purposes of hiding the mouse pointer and resetting the scrollback. check-in: a0c27fcd97 user: simon tags: trunk
2012-06-17
02:26
Support for dead keys and compose sequences on Unix, by instantiating a GtkIMMulticontext and having that filter most keypresses. I think I've got this right so that it doesn't break any previous deliberate keyboard-handling behaviour that's now _after_ the 'if (filter keypress) return' statement. check-in: e02da4865e user: simon tags: trunk
2012-06-09
10:09
Introduce a third setting for the 'bold as colour' mode, which lets you both brighten the colour _and_ bold the font at the same time. (Fixes 'bold-font-colour' and Debian #193352.) check-in: 8394417bea user: simon tags: trunk
2012-06-04
18:32
Add missing check for failure to agree a host key algorithm. check-in: dac73d4239 user: simon tags: trunk
2012-06-01
14:43
Missing #include. check-in: 22958c57fc user: simon tags: trunk
01:50
Fix a bug in cygtermd, spotted by Casey Zacek, in which we unconditionally set the telnet state to SEENCR regardless of whether we have actually seen a CR, and as a result sending a NUL through PuTTY (via Ctrl-Space or whatever) does not work. Must have arisen through some kind of really weird cut-and-paste error! check-in: f270727eb1 user: simon tags: trunk
2012-05-18
14:51
Enhance my 'sresize' macro so that it type-checks the pointer you pass _in_ to it, as well as the one it returns. Why have I never thought of doing that before?! check-in: 35bac4b296 user: simon tags: trunk
2012-05-15
17:19
Fix bug in the new CLOCK_MONOTONIC implementation. I was treating the nanoseconds field as a microseconds field, with hilarious consequences. check-in: 90d7f8c35f user: simon tags: trunk
2012-05-13
10:59
Use clock_gettime(CLOCK_MONOTONIC) as the Unix getticks(), if it's available. check-in: 37168cc6dd user: simon tags: trunk
10:59
Patch from Robert de Bath to substantially simplify timing.c. The previous platform-dependent ifdefs, switching between a system which tried to cope with spurious callbacks (which I'd observed on Windows) and one which tried to cope with system clock jumps (which can happen on Unix, if you use gettimeofday) have been completely removed, and replaced with a much simpler approach which just copes with system clock jumps by triggering any timers immediately. None of the resulting effects should be catastrophic (the worst thing might be the waste of CPU in a spurious rekey, but as long as the system clock isn't jumping around _all_ the time that's hardly critical) and in any case the Unix port has had a long-standing oddity involving occasional lockups if pterm or PuTTY runs for too long, which hopefully this should replace with a much less bad failure mode. And the code is much simpler, which is not to be sneezed at. check-in: 88bffdc065 user: simon tags: trunk
10:59
Fix from Robert de Bath which reorders the Windows initialisation sequence: since init_fonts sets up ucsdata based on the available Windows fonts, we should call it before passing ucsdata to term_init. check-in: 2717a22bba user: simon tags: trunk
10:59
Bug fix from Robert de Bath: since lpDx_maybe is always supposed to equal either lpDx or NULL, we mustn't forget to update it when we realloc lpDx. check-in: 97d3643dfe user: simon tags: trunk
2012-05-12
12:00
When we are asked to unthrottle an SSH connection (by the front end calling back->unthrottle), we should immediately call ssh_process_queued_incoming_data to handle the SSH packets that have been saved for later functioning while we were throttled. Otherwise, they'll sit there unhandled until the next call to ssh_gotdata, which might not be for ages if the server thinks it's waiting for us. check-in: 02b713d7b0 user: simon tags: trunk
2012-04-30
12:28
Fix trivial Perl goof in logparse.pl which caused SSH2_MSG_CHANNEL_FAILURE to be reported as replying to ARRAY(0xrubbish) instead of to a message number. check-in: cf89852550 user: simon tags: trunk
2012-04-24
12:33
Fix an inverted comparison in rlogin.c which must surely have broken logins completely, with or without a supplied username. Ahem. check-in: 43d74f79ef user: simon tags: trunk
2012-04-23
12:59
Call sshfwd_unclean_close() in the event of a local socket error on a forwarded X connection. (I somehow forgot to do this in r9364, despite making the identical change in portfwd.c.) check-in: b487bd5e1d user: simon tags: trunk
2012-04-22
09:22
Patch from Robert de Bath to ifdef out the Windows-specific hack for the offset horizontal line characters in the VT100 line-drawing set (o,p,r,s), so that no trace of it - and hence no pointless performance hit - is compiled into the cross-platform modules on non-Windows platforms. check-in: c9610e7ecb user: simon tags: trunk
09:22
Bug fix from Robert de Bath: if the utf8_override setting is changed in mid-session, it affects translation and hence display, so it should be listed among the settings that require a redraw. check-in: 15c9c5b0d3 user: simon tags: trunk
09:22
Bug fix from Robert de Bath: if wc_to_mb returns a length of zero, it will not even initialise sbstring[0], so we shouldn't even look at it let alone depend on it to tell us the desired character was absent. check-in: 31149e5bdd user: simon tags: trunk
2012-04-18
01:36
Conditionalise the calls to premsg and postmsg in uxcons.c's logevent(), which temporarily turn off the raw mode we've put stderr into, so that they don't get called if the log_eventlog() call between them is not _actually_ going to write to stderr. Fixes a bug in which, if you define a Unix PuTTY saved session which uses 'plink -nc' as a local proxy command and then run PuTTY backgrounded from the shell with that session loaded, the subprocess Plink would get SIGTTOU when it tried to muck about with stderr and the whole thing would grind to a halt. I'm prepared to consider that acceptable if Plink _really_ wants to write on standard error, but if it doesn't, it should just carry on working in the background! check-in: cdafcd314c user: simon tags: trunk
2012-04-16
13:21
Fix a Perl warning about useless use of a constant in void context. check-in: 176866b9c2 user: simon tags: trunk
2012-04-14
12:24
New utility script to parse an SSH packet dump and write out an interpretation with some analysis done on it. The script will do its own tracking of the set of open channels and their states, and its output is in a one-line-per-packet format such that every distinct channel has a unique identifier in it which should make it easy to grep out all lines relating to that channel. The script also matches up {CHANNEL,REQUEST}_{SUCCESS,FAILURE} to the requests that caused them, by tracking a queue of requests in each direction per channel and for global requests. Command-line options permit generating a final dump of all channels ever known to the script and their various ids and final state, and also dumping out the data transferred over each channel in each direction. Output is not complete, in the sense that some parameters in some messages (e.g. pixel sizes in window-size specifications) are deliberately omitted due to being boring, and the entire contents of some messages (e.g. KEXINIT) are omitted because I haven't yet seen any purpose in decoding them. Filling them in might be a useful thing, although I'm inclined to think that the default should still be to show only the potentially interesting stuff (e.g. still not pixel sizes!) and enable the rest using a -v option. Hopefully this should do a lot of the legwork in debugging issues in which a channel mysteriously remains partially open and prevents PuTTY closing. check-in: bacd65bbf5 user: simon tags: trunk
2012-04-13
13:02
Add code in dlg_filesel_set and dlg_fontsel_set which makes them duplicate the strings they pass to gtk_entry_set_text. I was already doing that in dlg_editbox_set, but forgot to add the same code when I revamped FontSpec and Filename to contain dynamically allocated strings (r9314 and r9316 respectively). This fixes a bug where, on some versions of GTK (but apparently not up-to-date versions), loading a saved session causes gibberish to appear in file-selector edit boxes accompanied by a valgrind error. check-in: 9e94ccddfe user: simon tags: trunk
2012-04-08
04:42
Fallout from the big revamp in r9214: colour handling was going a bit wonky because I'd used the subkey for the red component in four places where I should have used the green/blue subkeys instead. Thanks to Martin Kletzander for spotting it. check-in: 9bf895b959 user: simon tags: trunk
2012-03-05
12:40
Fix another type mismatch introduced by r9409. check-in: d2c442916f user: simon tags: trunk
12:34
Fix a type mismatch in minibidi.c - r9409 changed the 'wc' fields in bidi_char from wchar_t to unsigned int, but omitted to similarly adjust the parameter to doMirror which is passed a pointer to that field. check-in: 747a4a8d26 user: simon tags: trunk
12:32
Initialise some variables to NULL, to placate optimisers. check-in: f98093aa2e user: simon tags: trunk
2012-03-03
19:01
Remove comment about 1024/1023 RSA key lengths that's no longer true as of r9421. check-in: fdca1e4975 user: jacob tags: trunk
18:24
Generate keys more carefully, so that when the user asks for an n-bit key they always get an n-bit number instead of n-1. The latter was perfectly harmless but kept confusing users. check-in: de4b8709f0 user: simon tags: trunk
18:24
Long overdue rewrapping of the primes[] array for legibility. I think the previous ghastly formatting arose when I ran the whole source base through GNU indent... check-in: a4226d3c39 user: simon tags: trunk
2012-02-19
04:44
Update default key length in PuTTYgen to 2048. check-in: c630f6dc40 user: simon tags: trunk
04:32
Update to 2007-05-26 version of upstream wcwidth.c. check-in: e4d74f3b5c user: simon tags: trunk
04:27
Patch from Matsui Nag to implement xterm's "bracketed paste mode", in which text pasted into the terminal is preceded and followed by special function-key-like escape sequences ESC[200~ and ESC[201~ so that the application can identify it and treat it specially (e.g. disabling auto-indent-same-as-previous-line in text editors). Enabled and disabled by ESC[?2004h and ESC[?2004l, and of course off by default. check-in: 90e7b33dbb user: simon tags: trunk
2012-02-17
13:28
Patch from Yoshida Masato to fill in the missing pieces of Windows UTF-16 support. High Unicode characters in the terminal are now converted back into surrogates during copy and draw operations, and the Windows drawing code takes account of that when splitting up the UTF-16 string for display. Meanwhile, accidental uses of wchar_t have been replaced with 32-bit integers in parts of the cross-platform code which were expecting not to have to deal with UTF-16. check-in: af034c145b user: simon tags: trunk
2012-02-05
04:08
WM_SIZE/SIZE_MAXIMIZED can show up even during an interactive resize, so we should ensure we treat it the same way as other WM_SIZEs that show up during that time: set the width and height in conf, and set the flag to have that width and height enacted on WM_EXITSIZEMOVE. Fixes a bug in which dragging a PuTTY window directly from the Win7 snapped-to-half-screen position to the snapped-to-maximised state would leave the terminal in the pre-snapped size. check-in: f465256d47 user: simon tags: trunk
2012-01-29
18:29
New FAQ: "When I put PuTTY in C:\WINDOWS\SYSTEM32 on my 64-bit Windows system, `Duplicate Session' doesn't work." (Explanation courtesy Owen.) check-in: a4057416e6 user: jacob tags: trunk
2012-01-26
12:53
It's a new year. check-in: 5c1e09c0b1 user: jacob tags: trunk
12:22
If we're called on to uncleanly close an SSH channel for which we've already sent SSH2_MSG_CHANNEL_CLOSE, we should not skip the _whole_ of sshfwd_unclean_close(), only the part about sending SSH2_MSG_CHANNEL_CLOSE. It's still important to retag the SSH channel as CHAN_ZOMBIE and clean up its previous data provider. check-in: 4dc3ffb821 user: simon tags: trunk
2012-01-03
13:43
Patch from Colin Watson to use g_ascii_strcasecmp in place of the deprecated g_strcasecmp (since all the strings being compared are parts of XLFDs and won't be in interesting character sets anyway). check-in: 861a49e69b user: simon tags: trunk
2011-12-10
12:08
Tag 0.62 release. Leaf check-in: 9c44b3c894 user: simon tags: putty-0.62, putty-branch-0.61
08:03
Checklist update following the 0.62 release. I managed to send out the announcement email without a subject line, so I'm reorganising the announcement entry in the checklist in the hope that it'll make it harder for me to get that one wrong in future! check-in: 2e6ff4194a user: simon tags: trunk
06:07
Bump version number on trunk prior to tagging 0.62 on the branch. check-in: 896ba0eb03 user: simon tags: trunk
2011-12-08
13:15
Introduce a function sshfwd_unclean_close(), supplied by ssh.c to subsidiary network modules like portfwd.c. To be called when the subsidiary module experiences a socket error: it sends an emergency CHANNEL_CLOSE (not just outgoing CHANNEL_EOF), and immediately deletes the local side of the channel. (I've invented a new channel type in ssh.c called CHAN_ZOMBIE, for channels whose original local side has already been thrown away and they're just hanging around waiting to receive the acknowledging CHANNEL_CLOSE.) As a result of this and the last few commits, I can now run a port forwarding session in which a local socket error occurs on a forwarded port, and PuTTY now handles it apparently correctly, closing both the SSH channel and the local socket and then actually recognising that it's OK to terminate when all _other_ channels have been closed. Previously the channel corresponding to the duff connection would linger around (because of net_pending_errors never being called), and keep being selected on (hence chewing CPU), and inhibit program termination at the end of the session (because not all channels were closed). check-in: 9377dd8f27 user: simon tags: trunk
13:15
Arrange to call net_pending_errors on Unix, which we've never actually remembered to do before! Also some related fixes, such as that after we do so we should immediately stop selecting on the socket in question. check-in: 49322399b9 user: simon tags: trunk
13:15
When we receive CHANNEL_CLOSE on an SSH-2 channel and haven't sent EOF on it yet, we should send EOF on _that channel_, not the main session channel! Oops. check-in: 88c017dc17 user: simon tags: trunk
13:15
Whitespace fix while I was passing. check-in: a1b22459c5 user: simon tags: trunk
13:15
Make sure we never send window adjustments (or winadjes) on channels for which we've already sent CHANNEL_CLOSE. It would be embarrassing if the remote end had also sent CHANNEL_CLOSE in response and then received our communication once it had forgotten about the channel. check-in: fe229d2998 user: simon tags: trunk
13:15
Block SIGPIPE in Unix plink. In a port-forwarding run we may have lots of local sockets and pipes all open at once, and if one of them is uncleanly closed from the remote end we don't want the whole application to die - we want to close that socket's SSH channel and continue with the rest of the run. check-in: e039bca76c user: simon tags: trunk
2011-12-07
13:07
Add a missing free_prompts() call in the keyboard-interactive code. check-in: 596656b982 user: simon tags: trunk
2011-11-28
13:23
Tiny patch from Martin Packman to fix a Windows handle leak in Pageant's IPC mechanism. It's incomplete (he sent a much more comprehensive set of fixes that I haven't reviewed), but should be adequate to mitigate a particular issue for Bazaar users. check-in: 8050548bc2 user: simon tags: trunk
13:17
I missed a bit in r9343: windows/version.rc2 also needed updating for the new 'pre-release' version type. check-in: a0be433597 user: simon tags: trunk
2011-11-27
05:10
Add a release checklist entry to remind me to get rid of 'pre-release' sections on the Download page. check-in: 5cc46486b7 user: simon tags: trunk
2011-11-26
11:35
Introduce a new version type, 'prerelease'. Quotes the version number it's a pre-release of, and the revision number so you can tell two pre-releases apart. I intend to use this for builds from branch-0.61 until I call it 0.62 proper. check-in: acf1c41d51 user: simon tags: trunk
2011-10-14
02:03
Support code page 852. Thanks to Tamas Tevesz. check-in: 7459546673 user: simon tags: trunk
2011-10-02
09:16
Private files saved on Unix should have mode 0600, not 0700. They're generally private-key files, which have no need to be executable. check-in: c4dd9a1230 user: simon tags: trunk
09:14
More arbitrary-limit hunting: retire PASSPHRASE_MAXLEN in the Windows GUIs of Pageant and PuTTYgen. With that and the prompts_t redesign, there should no longer be any limit on passphrase length other than the patience of the user. check-in: 2a6b005d2c user: simon tags: trunk
09:03
Another utility function, to free a string containing sensitive data. check-in: 27157daada user: simon tags: trunk
08:53
Move a recently introduced utility function out of the file in which I declared it static, and into winutils.c where it can be more generally accessible. check-in: 2dfc9e873c user: simon tags: trunk
06:50
While I'm crusading against arbitrary limits, here's a redesign of prompt_t to arrange that the buffer in which each prompt is stored can be reallocated larger during the input process. check-in: 3f7657c9b5 user: simon tags: trunk
06:01
Turn 'Filename' into a dynamically allocated type with no arbitrary length limit, just as I did to FontSpec yesterday. check-in: 7756dc109c user: simon tags: trunk
2011-10-01
13:00
Fix copy-and-paste error in command-line font selection in r9314. check-in: 2d4a59148d user: jacob tags: trunk
12:38
Change the semantics of 'FontSpec' so that it's a dynamically allocated type. The main reason for this is to stop it from taking up a fixed large amount of space in every 'struct value' subunion in conf.c, although that makes little difference so far because Filename is still doing the same thing (and is therefore next on my list). However, the removal of its arbitrary length limit is not to be sneezed at. check-in: 78529746fb user: simon tags: trunk
2011-09-19
11:38
We shouldn't fork off a utmp helper subprocess when we aren't setuid, because (a) under that circumstance we won't be writing to utmp anyway, and (b) if we aren't setuid, then we won't have created the pty at the point we fork, so even if our subprocess _could_ have written to utmp it wouldn't have done it right! Spotted by valgrind (triggering on the access beyond the end of the ttyname string in setup_utmp, clueing me in to it having been empty). check-in: acb21a748a user: simon tags: trunk
11:21
Add a missing initialisation to NULL. check-in: f2d153ee09 user: simon tags: trunk
2011-09-17
09:50
Cope with XFontStructs having a NULL per_char array, which happened to me this morning under strange circumstances. check-in: b1c237ec85 user: simon tags: trunk
03:11
Fix x11font_has_glyph so it doesn't get caught out by signed chars. check-in: 4cf87efd79 user: simon tags: trunk
2011-09-16
14:18
Suppress Pango's bidi, by displaying RTL characters one at a time. I hadn't previously noticed, but Pango was helpfully re-reversing text that PuTTY's own bidi module had already reversed, leading to Arabic text being wrongly displayed and also total chaos when you move the cursor over it or try to cut and paste it. check-in: 62f403a7c9 user: simon tags: trunk
14:18
Support font fallback even when an X11 server-side font is selected, by introducing a wrapper around an individual unifont which falls back to Pango (which already has built-in fallback) in the case where the selected font doesn't support the glyph in question. The wrapper itself is a (vestigial) subclass of unifont, to minimise disturbance at the call sites. check-in: 91efaca9f4 user: simon tags: trunk
14:18
Change the unifont API so that text is passed right down to the individual font implementation as wchar_t, rather than having to be converted by the client into the appropriate MBCS/SBCS. This also means I can remove 'real_charset' from the public-facing contents of the unifont structure. check-in: a22d103f26 user: simon tags: trunk
14:18
Add some missing consts in character set handling. check-in: d7363b4954 user: simon tags: trunk
04:01
Remove empty.h from CLEANFILES, so that after mkfiles.pl has constructed it it won't be deleted again by 'make clean'. The effect is that not only does this work (as r9288 arranged), ./configure; make plink but these work too: ./configure; make; make clean; make plink ./configure; make; make distclean; ./configure; make plink check-in: e24f3aade9 user: simon tags: trunk
03:49
Stop using GDK's wrapper on the X11 font functions (GdkFont). All X11 font operations are now done directly using Xlib calls, and the only interaction with GDK within the x11font mechanism is to get the X ids for drawables, GCs and the X display itself. This should remove an obstacle to porting to GTK3, and also makes the XFontStruct for loaded fonts more readily available, which I hope will come in handy for another plan I have in mind. check-in: 7e53488c87 user: simon tags: trunk
2011-09-14
10:54
Create empty.h (used to force rebuilds of version.o by the automake makefile) as a side effect of running mkfiles.pl. The automake docs observe that the BUILT_SOURCES list is only automatically built by plain 'make' or 'make all' or a couple of other targets, so the sequence './configure && make plink' from a freshly unpacked tar file would previously fail for lack of empty.h. If empty.h had important _content_ that needed to be built at compile time, of course, I wouldn't be able to fix it like this; but since the only important thing is the timestamp, I can just make sure it already exists at the time of first build. check-in: 354e7a22cd user: simon tags: trunk
04:49
No, I take that back: we _do_ have a mechanism for suppressing reads from forwarding data sources which will be good enough to last until we close the socket, in the form of the override_throttle() functions. So this finishes up the work in r9283, by manufacturing outgoing EOF in response to incoming CLOSE on all channel types. check-in: a4b537e1f3 user: simon tags: trunk
04:09
Another tweak to EOF policy: invent an outgoing EOF on receipt of an incoming CHANNEL_CLOSE, if it's the main session channel. The idea is that invocations such as 'plink -T hostname sh' (running a shell without a remote pty) can be exited by typing 'exit' to the remote shell, without plink blocking forever waiting for outgoing EOF. I think it would be better to do the same for all other channel types too, but that would need an extra API call which I haven't implemented yet. check-in: 304b3571f2 user: simon tags: trunk
2011-09-13
10:38
Changed my mind about the EOF policy in SSH mode: I think the SSH backend should unilaterally assume outgoing EOF when it sees incoming EOF, if and only if the main session channel is talking to a pty. (Because ptys don't have a strong concept of EOF in the first place, that seems like a sensible place to draw the line.) This fixes a bug introduced by today's revamp in which if you used Unix Plink to run a console session it would hang after you hit ^D - because the server had sent EOF, but it was waiting for a client-side EOF too. check-in: 3aaf9b7e0f user: simon tags: trunk
06:56
Nearly forgot noting this down in the 'half-closed' bug entry: don't send CHANNEL_CLOSE until we have acks for all our winadj requests. Should work around https://bugzilla.mindrot.org/show_bug.cgi?id=1818 . check-in: de1e102574 user: simon tags: trunk
06:44
Revamp of EOF handling in all network connections, pipes and other data channels. Should comprehensively fix 'half-closed', in principle, though it's a big and complicated change and so there's a good chance I've made at least one mistake somewhere. All connections should now be rigorous about propagating end-of-file (or end-of-data-stream, or socket shutdown, or whatever) independently in both directions, except in frontends with no mechanism for sending explicit EOF (e.g. interactive terminal windows) or backends which are basically always used for interactive sessions so it's unlikely that an application would be depending on independent EOF (telnet, rlogin). EOF should now never accidentally be sent while there's still buffered data to go out before it. (May help fix 'portfwd-corrupt', and also I noticed recently that the ssh main session channel can accidentally have MSG_EOF sent before the output bufchain is clear, leading to embarrassment when it subsequently does send the output). check-in: 0831792ea4 user: simon tags: trunk
05:27
In term_init(), copy stuff out of the conf _before_ calling power_on(), since the latter calls term_schedule_cblink which expects term->blink_cur to have been initialised. check-in: 71f4e9ba69 user: simon tags: trunk
02:35
Fix assertion failure in wprefs() when the list is zero-length. Breaks any session-save operation in PuTTYtel due to the empty GSS list. check-in: 2244328453 user: simon tags: trunk
2011-08-20
03:18
Instead of testing for different versions of GTK in increasing order of preference so that the later ones overwrite the configured stuff from the older ones, test in decreasing order of preference and stop as soon as one is successful. Fixes a problem in which autoconfiguration on a system containing only GTK 1 would go wrong because the _failed_ test for GTK 2 would overwrite some but not all of the variables set by the successful test for v1. check-in: d340976f19 user: simon tags: trunk
02:56
Add a -U option to mkfiles.pl, which is just like -u except that it runs configure at the top level rather than the unix subdirectory. I'm getting into the idea of even doing it that way myself, because then I can do VPATH builds from the same source tree elsewhere. (Autoconf seems to be fine with doing multiple VPATH builds from the same source tree in different build directories, but gets upset if you try to do a VPATH build when you've done a normal build in the real configure directory. So this way I do what autoconf sees as _only_ VPATH builds.) check-in: e46cd25e46 user: simon tags: trunk
2011-08-19
09:55
Fix bug with setting window title on Unix that came in with r9214. check-in: 56f8573d8f user: jacob tags: trunk
2011-08-18
05:47
Fix a suspected bug in PSCP's SCP protocol fallback from r9214 (untested since I don't have access to a server that still needs this fallback). check-in: 35ad2471cb user: jacob tags: trunk
05:45
Restore data-bits options for "-sercfg" that were accidentally lost in r9214. check-in: 96a0aff613 user: jacob tags: trunk
2011-08-13
09:48
Readjust Pageant's SID check _again_, to make it the union of the policies before and after r9178, and hence able to talk to both 0.60-like and 0.61-like clients. I had failed to consider that many pieces of code derived from PuTTY would have imported the Pageant client code, so we shouldn't randomly stop supporting things just because _we_ aren't using them any more. check-in: 7ccaeb366c user: simon tags: trunk
2011-08-12
12:28
Updates to svn:ignore: ignore libversion.a in the top-level directory (for people doing their builds there), and ignore 'compile' in the unix subdirectory (a dropping from autotools that I missed). check-in: dee503b112 user: simon tags: trunk
2011-08-11
13:13
If we're printing password prompts to /dev/tty rather than standard error, we should also read the corresponding password inputs from /dev/tty. That way, redirection of Plink's standard input will play nicely with SSH sessions that need interactive login. (This is what we get for disdaining getpass(3) and going it alone, of course. But we had no choice, due to the extra output part way through keyboard-interactive.) check-in: 8196d21cac user: simon tags: trunk
12:59
Propagate file permissions in both directions in Unix pscp and psftp. I think I have to consider this to be a separate but related change to the wishlist item 'pscp-filemodes'; that was written before the Unix port existed, and referred to the ability to configure the permissions used for files copied from Windows to Unix - which is still not done. check-in: 797da58367 user: simon tags: trunk
2011-07-27
13:43
Fix bug in which the SSH-only tools (pscp, psftp) did not honour a nonstandard port number when loading a saved session. Occurs because those tools include be_none.c which defines no entries in backends[] at all, as a result of which settings.c doesn't recognise the word 'ssh' in the saved session's protocol field and instead sets the protocol to something idiotic - which _then_ means that when pscp.c forces the protocol to PROT_SSH, it also resets the port number as it would when overriding a saved session specifying a protocol other than SSH. The immediate solution is to define a new be_ssh.c citing only ssh_backend, and include that in the SSH-only tools. However, I wonder if a better approach (perhaps when I redesign session loading and saving) would be not to be so clever, and just have all the tools contain a complete list of known protocol names for purposes of understanding what's in the saved session data, and complain if you try to use one they don't know how to actually speak. check-in: 1cf8e55201 user: simon tags: trunk
2011-07-23
06:58
Add a convenience option to mkfiles.pl for Unix users. If you run 'mkfiles.pl -u', it will do its normal processing, then run mkauto.sh to regenerate configure and Makefile.in, then run configure in the Unix subdirectory to regenerate unix/Makefile. So it's a handy one-stop shop for going all the way from a modified Recipe to the end-product Unix makefile, if you're adding source files during development. check-in: 1159f161a7 user: simon tags: trunk
06:40
Add a wrapper script called 'configure' at the top level, which runs the real configure script from the unix subdirectory, but with cwd unchanged so that you end up doing a VPATH build in the top-level source directory. Should, ideally, placate the people who expect 'configure' to be at the top level, while still letting _me_ keep all the Unix-specific stuff in the Unix subdirectory. check-in: 305236bf03 user: simon tags: trunk
06:36
Rename --with-gtk-version to --with-gtk, and support its negation --without-gtk as a means of manually overriding the makefile into one building the command-line tools only (as it would if GTK were not found at all at configure time). check-in: fa0c434b75 user: simon tags: trunk
06:33
Switch to using automake for the Unix autoconfigured build. mkfiles.pl no longer generates a Makefile.in, but instead generates a Makefile.am on which mkauto.sh runs automake. This means that the autoconfigured makefile now does build-time dependency tracking (a standard feature of automake-generated makefiles), and is generally more like what Unix people will expect. Some of the old-style make command-line settings (VER=-DRELEASE=foo, XFLAGS=-DDEBUG) will still work; the COMPAT settings are better done by autoconfiguration, and my habitual 'XFLAGS="-g -O0"' for an easily debuggable build will actually not work any more because CFLAGS is specified _after_ XFLAGS, so I should instead write 'make CFLAGS=-O0' (-g is the default in automake, removed at 'make install' time). The new makefile will automatically degrade into one that builds the command-line tools only, in the case where GTK could not be found. In principle, therefore, it should be an adequate replacement for _both_ the static Unix makefiles, Makefile.gtk and Makefile.ux. I haven't actually retired those in this commit, but I'm pretty tempted. check-in: 5673b9ee77 user: simon tags: trunk
2011-07-20
12:50
When we check for libX11 in the autoconf script, add it to $GTK_LIBS on success rather than to $LIBS, because it's only used in the GUI tools and we don't want the command-line tools linked against it. check-in: 0aef2c9483 user: simon tags: trunk
10:55
Fix 'Duplicate Session' on Windows, broken during the config revamp. (In an embarrassingly silly way, too. No end of difficult stuff about Conf serialisation done with great care and working just fine, and then a trivial goof in using sscanf lets the whole lot down.) check-in: 552d854ddf user: simon tags: trunk
2011-07-19
12:06
Trivial fix for assertion failure introduced by the config revamp. Spotted by Leonid Lisovskiy. check-in: a1d007c7bc user: simon tags: trunk
2011-07-18
13:09
Minor amendment to r9226: don't log GSSAPI failure in the Event Log twice. (Once in the GSSAPI code, once at the top of the main auth loop. Removed the latter.) check-in: 5ba3965a58 user: simon tags: trunk
13:04
Reinstate a missing invocation of the FONT_QUALITY macro which I accidentally removed in the big config revamp. check-in: 73aacdd5a1 user: simon tags: trunk
2011-07-17
17:35
Fix a typo in r9214 that plausibly explains a resizing weirdness I had with today's snapshot on Windows. check-in: 322ea75b60 user: jacob tags: trunk
17:17
Fix version reporting in Unix builds versioned by a specific svn revision ('Custom build r1234'). Those builds were passing '-DSVN_REV=r1234' to version.c, instead of -DSVN_REV=1234 as they should have, leading to silly run-time version messages such as 'plink: Custom build rr9226'. To chop the r off the front of the revision string passed in, I've used a bashism in mkunxarc.sh. I think this is an acceptable extra dependency. check-in: 1826aa4c4e user: simon tags: trunk
17:17
--with-gtk-version option to configure, so you can explicitly tell it which GTK version you want to build with if both are installed. Based on a patch by Malcolm Smith, though somewhat modified. check-in: 1f7aaf36c7 user: simon tags: trunk
17:17
Support for re-running autoconf in the absence of the autoconf macro files which provide auto-detection of GTK 1 and GTK 2. This makes it easier for casual PuTTY developers to rerun autoconf for their own purposes without having to install obscure extra packages. Obviously the resulting configure script will not know how to detect whichever version of GTK they didn't have support for, so it won't be product- quality by my standards, but it should be good enough that they can prepare unrelated patches to send to us. check-in: 442e9e10a6 user: simon tags: trunk
2011-07-16
11:25
Create new branch named "putty-branch-0.61" check-in: 427ffbcf9d user: simon tags: putty-branch-0.61
07:06
Reorganise the logging and display of messages about SSH authentication. We should now produce an Event Log entry for every authentication attempted and every authentication failure; meanwhile, messages in the PuTTY window will not be generated for the failure of auth types unless we also announced in the PuTTY window that we were trying them. (GSSAPI was getting the latter wrong, leading to spurious 'Access denied' for many users of 0.61.) check-in: 068c9141e5 user: simon tags: trunk
07:03
Mostly cosmetic change: don't claim to have found an SSH agent if SSH_AUTH_SOCK is defined to the empty string. (Because a common way to 'unset' it is to run commands like 'SSH_AUTH_SOCK= putty -load thing'.) check-in: 1e2bd9c501 user: simon tags: trunk
06:13
Fix display of VT100 vertically-offset horizontal line characters (o,p,r,s). They are displayed in Windows by actually writing the centred one (q) with a vertical offset, in case fonts don't have the offset versions; this requires terminal.c to separate those characters into distinct calls to do_text(). Unfortunately, it was only breaking up a text-drawing call _before_ one of those characters, not after one. Spotted by Robert de Bath. check-in: 212f345d1f user: simon tags: trunk
2011-07-15
13:30
Don't delete everything under a string-subkeyed primary key by using a loop that fetches the next item using conf_get_str_strs and passing the previous key as a parameter, because the previous key will have been freed by the intervening conf_del_str_str. Instead, use the technique of repeatedly using conf_get_str_nthstrkey with index 0 and deleting what comes back, as PSCP and PSFTP do. Spotted by Minefield with the aid of Jacob, or possibly vice versa. check-in: b26163158f user: simon tags: trunk
13:21
Missing free. check-in: 37a083ba13 user: simon tags: trunk
13:18
conf_copy_into must empty the entire target conf before filling it with the entries from the source one, otherwise add234 will keep failing ("this key already exists"). Completely broke Plink, ahem. check-in: 976bebec7b user: simon tags: trunk
11:03
When doing manual underlining, underline the text in question rather than a box to the right of it. Probably introduced sometime around r9063. check-in: 08a0d45df9 user: jacob tags: trunk
2011-07-14
13:52
Post-release destabilisation! Completely remove the struct type 'Config' in putty.h, which stores all PuTTY's settings and includes an arbitrary length limit on every single one of those settings which is stored in string form. In place of it is 'Conf', an opaque data type everywhere outside the new file conf.c, which stores a list of (key, value) pairs in which every key contains an integer identifying a configuration setting, and for some of those integers the key also contains extra parts (so that, for instance, CONF_environmt is a string-to-string mapping). Everywhere that a Config was previously used, a Conf is now; everywhere there was a Config structure copy, conf_copy() is called; every lookup, adjustment, load and save operation on a Config has been rewritten; and there's a mechanism for serialising a Conf into a binary blob and back for use with Duplicate Session. User-visible effects of this change _should_ be minimal, though I don't doubt I've introduced one or two bugs here and there which will eventually be found. The _intended_ visible effects of this change are that all arbitrary limits on configuration strings and lists (e.g. limit on number of port forwardings) should now disappear; that list boxes in the configuration will now be displayed in a sorted order rather than the arbitrary order in which they were added to the list (since the underlying data structure is now a sorted tree234 rather than an ad-hoc comma-separated string); and one more specific change, which is that local and dynamic port forwardings on the same port number are now mutually exclusive in the configuration (putting 'D' in the key rather than the value was a mistake in the first place). One other reorganisation as a result of this is that I've moved all the dialog.c standard handlers (dlg_stdeditbox_handler and friends) out into config.c, because I can't really justify calling them generic any more. When they took a pointer to an arbitrary structure type and the offset of a field within that structure, they were independent of whether that structure was a Config or something completely different, but now they really do expect to talk to a Conf, which can _only_ be used for PuTTY configuration, so I've renamed them all things like conf_editbox_handler and moved them out of the nominally independent dialog-box management module into the PuTTY-specific config.c. check-in: a2c0243430 user: simon tags: trunk
2011-07-12
14:59
Readjust checklist, because actually the section on updating the website _wasn't_ missing - I just looked straight past it somehow. Fold the two versions together into one more complete than either. check-in: 8bd5634b69 user: simon tags: trunk
14:56
Various updates to the release checklist: - for 'ixion' read 'atreus' throughout - the signature-checking commands needed minor modifications to cope with more *sums files - stated a few things explicitly which were previously implied, in case the next inter-release gap is also long enough for me to forget them. check-in: 2f52ee5e83 user: simon tags: trunk
13:26
Bump version number prior to tagging 0.61 release. check-in: 5cdb9218c9 user: simon tags: trunk
13:13
Fix the _rest_ of the Windows compile warnings. (ahem) check-in: d6f00ed3c4 user: simon tags: trunk
13:09
Fix Windows compile warnings by adding explicit casts. check-in: 41069e17e8 user: simon tags: trunk
2011-07-10
09:22
Add a directory 'contrib/cygtermd', containing the source code for my hacky helper program to let PuTTY act as a local pterm-oid on Cygwin-enabled Windows systems. check-in: baadd9c253 user: simon tags: trunk
06:45
Generate some checksum files with more up-to-date hash functions than MD5. Shipped (and signed) alongside the existing 'md5sums' file. check-in: a7fd5e4a15 user: simon tags: trunk
2011-07-01
16:53
Fix 'winadj-success': since at least one server (boks_sshd) blithely responds to "winadj@putty.projects.tartarus.org" with SSH_MSG_CHANNEL_SUCCESS despite probably having no idea what it means, treat this just the same as SSH_MSG_CHANNEL_FAILURE instead of killing the connection. Tested only as far as making sure that winadj/FAILURE with a normal server isn't _completely_ broken. check-in: f1abb22039 user: jacob tags: trunk
2011-06-25
12:37
Rewrite gprefs() in settings.c so that its input mapping includes information about where to put items that aren't mentioned in the saved configuration. So far the only nontrivial use I've made of this facility is to default to placing KEX_RSA just above KEX_WARN in the absence of any other information, which should fix 'ssh2-rsa-kex-pref'. While I'm here I've rewritten wprefs() on general principles to remove the needless length limit, since I was touching it anyway. The length limit is still in gprefs (but I've lengthened it just in case). check-in: 4adc7eb538 user: simon tags: trunk
2011-06-08
15:47
Make Pageant use the same SID-selection logic as the Pageant client code (as introduced in r9043), so that it uses the user SID rather than the default SID. This does change the access-control model, in that a Pageant running with administrator privilege will now serve keys to an unprivileged PuTTY running as the same user who started Pageant. Owen and I think this isn't a problem (in particular, it will still not serve keys to a _different_ user). More importantly, making the Pageant client and server code work the same way means that PuTTY and Pageant can still talk to each other when UAC is turned off, which we've had several reports of r9043 having broken. check-in: 6c7c0b8c61 user: simon tags: trunk
15:39
When we fail to get a response from Pageant, we should log the fact. Currently, if the IPC exchange goes wrong, the Event Log just prints "Pageant is running. Requesting keys." and then goes on to the next step without ever saying what happened. check-in: fe6e6a6d68 user: simon tags: trunk
2011-05-07
05:57
Fixes (mostly from Colin Watson, a couple redone by me) to make Unix PuTTY compile cleanly under gcc 4.6.0 without triggering any of its new warnings. check-in: af856539a4 user: simon tags: trunk
2011-04-08
10:52
The documentation was still claiming that we don't support x11-auth. check-in: 7bcc78c213 user: jacob tags: trunk
2011-03-09
12:10
Note the possibility of a pause due to /dev/random blocking. check-in: e3145b1e0c user: jacob tags: trunk
2011-03-04
16:34
Implement zlib@openssh.com, using the rekey-after-userauth method suggested in the wishlist entry. check-in: d3818c897b user: jacob tags: trunk
2011-03-02
13:12
Colin Watson reports that gnome-session has been known to leave SIGPIPE ignored in its child processes, leading to unexpected behaviour inside pterms. (The gnome-session I'm sitting in front of doesn't seem to do this as far as I can tell, but I don't doubt there are some that do.) Add SIGPIPE to the list of signals we reset to default behaviour before launching pterm's child process. check-in: c736ac142e user: simon tags: trunk
12:52
Set the 'must_close_session' flag at the end of close_session(), so that we won't keep calling close_session() again the next time we go round the message loop. Should fix unclean-close-hang. Thanks to Simon Coleman for debugging. check-in: 5813186d25 user: simon tags: trunk
2011-03-01
18:18
Fix probably-harmless type mismatch in nogss.c (and #include "putty.h" to stop it happening again; this was spotted by GCC's "-flto" option). check-in: 0ad7c507f1 user: jacob tags: trunk
17:44
Add some extra validation to zlib decompression (primarily to shut up a GCC 4.6 warning). check-in: 7e474fcfd0 user: jacob tags: trunk
17:10
Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6 -Wunused-but-set-variable. check-in: 3d803e4303 user: jacob tags: trunk
17:04
Remove an unused variable (should shut up a warning from GCC 4.6). check-in: 3fd9cd6610 user: jacob tags: trunk
17:00
Use pid_t more consistently. Should shut up a warning from GCC 4.6, and may conceivably help on platforms where int and pid_t aren't sufficiently similar. check-in: 5b7da77997 user: jacob tags: trunk
2011-02-22
13:09
Rejig the bottom-level loops in internal_mul_* to use pointers instead of array indices. You'd hope that compilers could automatically turn the one representation into the other if it was faster to do so, but apparently not: even on gcc -O3, this source transformation gains over 15% performance. check-in: 6763461ff8 user: simon tags: trunk
2011-02-21
18:06
Make bignum.py self-contained, by importing versions of the two functions I was depending on from my personal Python maths utility module. check-in: 77e95b9423 user: simon tags: trunk
13:47
Move the malloc and free of scratch space out of the internal_mul routines into their callers, where they'll be done once for a whole modpow rather than many times within each multiply. Doesn't save much time as far as I can see - perhaps a couple of percent, one second in the minute it takes to run the new bignum test suite - but seems like a sensible idea anyway on general principles. check-in: b2634a2d13 user: simon tags: trunk
2011-02-20
09:45
svn:ignore property mentioning 'bignum.txt', which is what I'm calling the output of bignum.py. check-in: cd10252a20 user: simon tags: trunk
09:42
A few more modpow tests, exercising the fallback option. This is mostly so I can valgrind both and make sure they free all their workspace - a memory leak in this code would be not merely an inconvenience but a security hazard. check-in: 79e3267f39 user: simon tags: trunk
09:27
Add tests of modpow. check-in: 3d51962f75 user: simon tags: trunk
09:14
Nearly forgot. Reinstate the original unoptimised modpow, as a fallback for when Montgomery is inapplicable. (I may also at some point switch to using it for small exponents, if speed testing should reveal that there's a noticeable threshold beyond which preparing the Montgomery setup is uneconomical.) check-in: ea08136170 user: simon tags: trunk
09:06
Fix bug in Karatsuba multiplication, which affected propagation of a carry by more than one word. Now the current set of test cases all pass again. check-in: 27088925dd user: simon tags: trunk
08:59
Beginnings of a test suite for the bignum code. The output of testdata/bignum.py is twice the size of the rest of the PuTTY source put together, so I'm not checking it in. This reveals bugs in the new multiplication code, which I have yet to fix. check-in: 44a7af2b6b user: simon tags: trunk
2011-02-18
13:12
Prompt for a remote username in rlogin connections, if one wasn't specified in the configuration. Jacob's userpass abstraction proves its worth in making this a trivial job. (Actually reported by a user - somebody's still using rlogin!) check-in: 05d4b5c93b user: simon tags: trunk
02:25
Implement the Chinese Remainder Theorem optimisation for speeding up RSA private key operations by making use of the fact that we know the factors of the modulus. check-in: a46f247bcf user: simon tags: trunk
02:25
Implement the Montgomery technique for speeding up modular exponentiation by replacing the modulo operation by a cleverly chosen multiplication. This was not worth doing in the previous state of the code (because my multiply was about as slow as my modulo), but now that multiplication has been sped up by the Karatsuba optimisation, Montgomery becomes worthwhile. check-in: 5a0a3cc1d6 user: simon tags: trunk
02:25
Implement the Karatsuba technique for recursive divide-and-conquer optimisation of large multiplies. check-in: db09cee4b7 user: simon tags: trunk
02:25
Add some appropriate bignum typedefs for generic 64-bit systems, setting BignumInt to 32 bits. gcc defines _LP64 on x86-64 and presumably on other 64-bit architectures, so I've conditioned my defines on that in the hope that they won't need redoing for the next few such architectures. I've also added a set for _LLP64, but it's untested as yet. check-in: d00a7a3fe5 user: simon tags: trunk
2011-01-15
05:39
Allow setting the WM_CLASS X window property as a configuration option in saved sessions, so that a programmable window manager can distinguish different PuTTYs/pterms on startup and assign them different window management properties. check-in: b43117417a user: simon tags: trunk
2011-01-14
13:57
Tweak to r7635: when changing between protocols in the configuration dialog and avoiding trashing a non-default port, don't treat a port of 0 as special; this was causing defaults to "freeze in" for sequences of clicks like SSH, Raw, Telnet. Arrange that a port of 0 (which in a backend indicates no default) is displayed as a blank in the port box, to make this less jarring. check-in: b987ab04d5 user: jacob tags: trunk
2011-01-05
06:01
It's a new year. check-in: 7c9ba49fb2 user: jacob tags: trunk
05:58
Remove references to the now-dead Mac OS 9 port. check-in: 5082b53ea1 user: jacob tags: trunk
2011-01-03
10:50
When iterating over all channels for a dead SSH connection, don't miss out those in the CHAN_SOCKDATA_DORMANT state (i.e., local-to-remote forwardings which the SSH server had not yet acknowledged). Marcel Kilgus has been running with the ssh_do_close() patch for nearly two years (*cough*) and reports that it has eliminated frequent 'unclean-close-crash' symptoms for him (due to the unclosed socket generating a pfd_closing() which accessed freed memory), although I've not reproduced that. The patch to ssh_free() is mine and not known to fix any symptoms. check-in: 170d3850d4 user: jacob tags: trunk
2010-12-29
18:06
Stop general_textout() from trying to slice up the input clipping rectangle into smaller ones: it doesn't work any more, since the new variable-pitch code can now call general_textout() with a larger clipping rectangle than the text it's meant to be displaying. Instead, general_textout() now uses the same semantics as the next loop up in do_text_internal(): the first piece of text it displays uses the opacity setting passed in, which blanks the entire clipping rectangle if necessary, and then subsequent overlays are non-opaque. And the same clipping rectangle is used throughout. check-in: 5d4503f498 user: simon tags: trunk
17:48
Rationalise the mechanism in do_text_internal for providing the 'lpDx' array to ExtTextOut: - move it inside the new big loop (this should fix a potential bug whereby the DBCS handling altered some elements of it but the loop did not actually step along it) - initialise it more sensibly - rename it to lpDx rather than IpDx, since as far as I can tell the latter name was derived from a misreading of the former in the Windows API docs. check-in: c25029f114 user: simon tags: trunk
16:38
Move some not-compiled-in debug code somewhere more useful. check-in: 314693f089 user: jacob tags: trunk
10:00
Fix segfault in general_textout with variable-pitch fonts: we can't pass null lpDx, because general_textout depends on it being filled in. Instead we null it out in the calls to subroutines _from_ general_textout. check-in: 26def99f43 user: simon tags: trunk
08:11
Support for using variable-pitch fonts for the terminal on Windows. Done in much the same way as it is in the GTK front end: the character cell width is determined using the font's digits (which seems to give generally not-too-offensive spacing in most cases, at the expense of Ms and Ws typically overhanging a bit into adjacent cells) and each character is centred in its cell. Overhangs never leave permanent droppings on the window, because the existing work done in r5003 handles them just fine even in this stressful scenario. There's a hacky new checkbox in the Appearance panel to make variable-pitch fonts appear in the font selector (they still don't by default, because I still think it's _usually_ not What You Want); the checkbox state is not actually stored as part of a saved session, but it should be automatically ticked when reloading a session that's got a variable pitch font selected. (I'm half-expecting a potential flurry of requests for this feature in the wake of http://xkcd.com/840/ , so I thought I'd pre-empt them :-) check-in: be5245e8df user: simon tags: trunk
07:35
Vyacheslav Andrejev points out a heap management goof in the new jump list code. Free the old value of the pointer variable we just overwrote, not the new one! check-in: 6a150405a0 user: simon tags: trunk
05:57
Thou shalt not suffer a misplaced apostrophe to live. check-in: 496ebff61c user: simon tags: trunk
2010-12-27
06:58
Fix resize handling when enabling and disabling full-screen mode. I'm not sure whether I broke this in the recent revamp or whether it was always broken, but: transitions in and out of full-screen mode work by first maximising or restoring the window, which triggers a WM_SIZE, whose handler then fiddles with the window style to disable or re-enable all the furniture, which in turn triggers a recursive WM_SIZE. The trouble is, after returning from the handler for the inner WM_SIZE, the rest of the outer handler runs, and its client area size is now out of date. So I've added a flag which is set when a resize is handled 'properly', so that after returning from the inner WM_SIZE handler the outer one knows not to try to redo badly work that's already been done well. check-in: b927047766 user: simon tags: trunk
2010-12-26
19:19
Add an option to disable SSH-2 banners. check-in: 70e16df16a user: jacob tags: trunk
18:24
Fix up svn:eol-style and svn:keywords on new files. check-in: f1c6bc77f0 user: jacob tags: trunk
17:23
Remove a couple of unused variables. check-in: b5a4e27069 user: jacob tags: trunk
14:00
Try to delete jump lists in "-cleanup". check-in: ef461c066a user: jacob tags: trunk
12:29
Optionally define PropVariantInit() locally to restore ability to build with MinGW after r9046, and munge the COMPTR() macro to remove a couple of warnings with my MinGW GCC (3.4.5). check-in: 20ed7b022e user: jacob tags: trunk
2010-12-23
16:19
Document the behaviour of Alt in the "hybrid" resizing mode alluded to in r9045. check-in: e99b02dc9e user: jacob tags: trunk
11:32
Support for Windows 7 jump lists (right-click on a program's taskbar icon, even if the program isn't running at the time, to be presented with an application-defined collection of helpful links). The current jump list is updated every time a saved session is loaded, and shows the last few launchable saved sessions (i.e. not those like Default Settings) that were loaded. Also, if Pageant or PuTTYgen or both is in the same directory as the PuTTY binary, the jump list will present links to launch those too. Based on a patch sent last year by Daniel B. Roy, though it's barely recognisable any more... check-in: 70edd9bb03 user: simon tags: trunk
11:16
The special treatment of Alt-resize (to cause resizing to affect the font instead of the terminal size) should only be active in RESIZE_EITHER mode - in RESIZE_TERM it is worse than useless. check-in: 5b02dad7cc user: simon tags: trunk
09:44
Another fix to yesterday's window-resizing revamp: when restoring from maximised state, we must be sure to disable the window offset used to centre the terminal in cases where the window is non-negotiably the wrong size (e.g. maximised). Hence we must call reset_window after our terminal resize. check-in: a41a48a0c1 user: simon tags: trunk
09:22
More careful owner SID selection in the Pageant client code. This should solve some of the SID-mismatch issues we've occasionally had reported. Because it's a modification on the client side, it doesn't affect the security of Pageant itself. check-in: 4f89367225 user: simon tags: trunk
2010-12-22
10:14
Pay attention to the width and height provided in WM_SIZE even when restoring a maximised window. Failure to do this was noticeable in the following scenario (again using Aero UI enhancements): 1. resize window using topmost resize handle, and move pointer to top of screen which 'maximises' the window vertically 2. now maximise the window properly using the maximise button in top right 3. now restore. Notepad restores to its position before step 1, because Aero remembers that position for the purpose, but PuTTY thinks it knows better. Only now it doesn't any more. check-in: 5ed4cc5656 user: simon tags: trunk
09:49
Reorganise handling of WM_SIZE to fix two generality problems. Firstly, maximise and restore events were expected never to occur during an interactive resize process (i.e. between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE), but in fact Aero now allows this to happen if you move the pointer to the top of the screen while dragging the window. Secondly, plain old WM_SIZE events were expected never to occur _outside_ interactive resizes, but Aero permits that too (e.g. Windows-left and Windows-right), and also third-party window repositioning tools will send these. check-in: d757855927 user: simon tags: trunk
2010-12-21
04:11
Protect against a (non-security-related) buffer overrun if PuTTY is installed somewhere with an exceptionally long pathname. check-in: 19b6a76d14 user: simon tags: trunk
2010-12-20
07:04
Add an 'XLFLAGS' make variable to Makefile.vc, permitting user- supplied extra link flags. This makes it reasonably convenient to compile for Visual Studio debugging: just build using nmake /f Makefile.vc XFLAGS="/Zi /Od" XLFLAGS="/debug" then load the resulting executable into Visual Studio (using 'Open Project' rather than 'Open File') and the debugger should be able to access the source. check-in: 5e16327a65 user: simon tags: trunk
2010-12-17
07:42
Add some more entries to svn:ignore to cope with stuff left by Visual Studio 10. (Not that I think I'm about to migrate, but I've been experimenting.) check-in: ee59e64e76 user: simon tags: trunk
2010-12-08
08:21
Add more possible baud rates to the Unix serial backend. These are the union of rates found in the termios.h of Linux 2.6.24 and "SunOS 5.6 Generic_105181-29 sun4u sparc SUNW,Ultra-4" machines. After a patch by Thomas Bechtold. check-in: 37d03ad850 user: jacob tags: trunk
2010-12-06
18:21
More sensible (and also more idiomatic) bounds checking on esc_args. check-in: 5b87ace5cb user: simon tags: trunk
2010-11-06
12:22
David Laight reports that sometimes reads on a serial port will attempt to block, and hence return EAGAIN/EWOULDBLOCK, in spite of the port having been reported readable by select(2). Don't treat those errors as fatal. check-in: 39acc46815 user: simon tags: trunk
2010-09-27
06:33
Bah, r9008 caused an assertion failure on Windows due to a clash with the shortcuts for the preference list buttons. That'll teach me to only test the Gtk version. check-in: d73e4ddea8 user: jacob tags: trunk
2010-09-25
11:18
Add index terms for GSSAPI stuff. Mention GSSAPI in "use system username" section and other tweaks. check-in: 53dd162821 user: jacob tags: trunk
10:51
Since GSSAPI is now on its own panel, we may as well have a full set of keyboard shortcuts. check-in: 51759ca15c user: jacob tags: trunk
03:37
Oops: r9004 should have removed various pieces from the Makefile and header file setup too. check-in: 867a09535d user: simon tags: trunk
02:30
Retire the old Mac Classic port directory! It's been unused for ages, is increasingly irrelevant now that 'Mac' pretty much universally means something running OS X, is probably bit-rotted past usefulness already, and certainly will be after the next time some major reengineering takes place. check-in: 2ea358a2d5 user: simon tags: trunk
02:16
Cleanups of the GSSAPI support. On Windows, standard GSS libraries are now loaded from standard locations (system32 for SSPI, the registry-stored MIT KfW install location for KfW) rather than using the risky default DLL search path; I've therefore also added an option to manually specify a GSS DLL we haven't heard of (which should in principle Just Work provided it supports proper GSS-API as specified in the RFC). The same option exists on Unix too, because it seemed like too useful an idea to reserve to Windows. In addition, GSSAPI is now documented, and also (unfortunately) its GUI configuration has been moved out into a sub-subpanel on the grounds that it was too big to fit in Auth. check-in: e760173d54 user: simon tags: trunk
2010-09-15
13:50
Use the same key for both saving and loading the GSSAPI implementation preference list. Spotted by Daniel Kessler. check-in: cd8bd17f89 user: jacob tags: trunk
2010-09-13
03:45
Fix obvious braino in the Windows GSSAPI library display names. check-in: ef13b5d841 user: simon tags: trunk
03:29
Create, and use for all loads of system DLLs, a wrapper function called load_system32_dll() which constructs a full pathname for the DLL using GetSystemDirectory. The only DLL load not covered by this change is the one for gssapi32.dll, because that one's not in the system32 directory. check-in: ebb9344ea6 user: simon tags: trunk
2010-09-09
09:36
Missing close() causing resource leak when reading from /dev/random. check-in: 98904e2e61 user: simon tags: trunk
09:35
Remove redundant check for NULL in sshfwd_close(). The thing we're testing against NULL has already been dereferenced by the time we bother to test it, so it's a bit pointless - and in any case, no null pointer can come to this function from any existing call site. check-in: f6168ac02d user: simon tags: trunk
09:32
Cast incoming characters to unsigned char to avoid accidental sign extension. Since ldisc_send() uses bit 8 as an internal flag, we shouldn't be setting it except when we really want to. check-in: c0b06b69f5 user: simon tags: trunk
2010-08-10
13:45
When we disconnect because we have no supported authentication methods left to try, it's nice to have the version of that message going to the client contain the list of methods sent by the server. Saves a user having to pull it out of an SSH packet log. check-in: b79dae693b user: simon tags: trunk
12:21
Mass correction of svn:keywords and svn:eol-style properties. check-in: fdf4280859 user: simon tags: trunk
2010-07-30
15:47
Cancelling a remote port forwarding that had been refused by the server caused a double-free. Reported and diagnosed by Sven Schaepe. Also fix a minor memory leak in ssh_free(). check-in: 679b1b8e8b user: jacob tags: trunk
14:45
A comment typo fix I've had lying around for a while. check-in: 8d38bf5439 user: jacob tags: trunk
2010-07-04
17:53
Patch from Alan Ning (somewhat polished by me): introduce a flag called 'pending_close'. This deals with the situation in which we're forwarding a port, have received and locally buffered some data from the local endpoint but not yet been able to pass it down the SSH connection due to window limitations, and then the local endpoint closes its socket. In this situation what we've been doing until now is to immediately send SSH2_MSG_CHANNEL_CLOSE, causing the data still in our local buffer to be lost; now we instead set the new flag, which will remind us to send SSH2_MSG_CHANNEL_CLOSE _after_ we empty our bufchain. Should fix at least one manifestation of 'portfwd-close', though I don't know if it's the cause of all the reports we've ever seen. check-in: d39e55d060 user: simon tags: trunk
2010-06-29
17:00
Set WM_TRANSIENT_FOR appropriately on the "about" box so that fvwm doesn't insist on finding a bit of spare screen to put it in. Still pondering whether it's sensible to do this with the "change settings" box as well. check-in: 4600d0085a user: ben tags: trunk
2010-05-30
17:50
Move '-w' in the #! line into 'use warnings;' in the Perl code, to simplify the #! line. check-in: c2d1be4c30 user: simon tags: trunk
2010-05-29
09:04
'perl -w' safety in mkfiles.pl. check-in: 4d70ed20bd user: simon tags: trunk
2010-05-22
09:07
Restore the configure check for GTK 1, which I accidentally removed as part of r8952 (the patch submitter had done it as a temporary measure and I forgot to undo it before checkin). check-in: 63cb12ddf5 user: simon tags: trunk
2010-05-19
13:22
Patch from Alejandro Sedeno, somewhat modified by me, which reorganises the GSSAPI support so that it handles alternative implementations of the GSS-API. In particular, this means PuTTY can now talk to MIT Kerberos for Windows instead of being limited to SSPI. I don't know for sure whether further tweaking will be needed (to the UI, most likely, or to automatic selection of credentials), but testing reports suggest it's now at least worth committing to trunk to get it more widely tested. check-in: d096e14ac5 user: simon tags: trunk
2010-04-26
12:28
When doing custom bob builds from a given SVN revision, include the date and time in the About box. check-in: e39ea5f37a user: simon tags: trunk
2010-04-24
02:14
Bah, missed out a tiny but build-breaking part of r8926. check-in: cbd85b4490 user: simon tags: trunk
2010-04-23
13:32
New SSH bug flag, for 'can't handle SSH2_MSG_IGNORE'. Another user today reported an SSH2_MSG_UNIMPLEMENTED from a Cisco router which looks as if it was triggered by SSH2_MSG_IGNORE, so I'm experimentally putting this flag in. Currently must be manually enabled, though if it turns out to solve the user's problem then I'll probably add at least one version string... [Edited commit message: actually, I also committed in error a piece of experimental code as part of this checkin. Serve me right for not running 'svn diff' first.] check-in: 9c99f25c74 user: simon tags: trunk
2010-04-12
06:02
Add comments on OpenSSH AES-encrypted key support, including one mentioning that I haven't yet switched to _exporting_ OpenSSH keys in the new style. check-in: 3b36ea5a90 user: simon tags: trunk
05:55
Support importing of new-style OpenSSH private keys (encrypted by AES rather than 3DES). check-in: ef0fbcd9b8 user: simon tags: trunk
2010-03-25
19:54
Remove SECURITY_WIN32 (knock-on from r8910, which validates it somewhat). check-in: 137be05b3b user: jacob tags: trunk
13:41
r8909 broke the Visual Studio build. check-in: 0fc8f8c9ea user: jacob tags: trunk
2010-03-24
15:12
When looking for a local username on Windows, if we can get hold of the NameUserPrincipal, use that; this avoids an issue with SSPI/GSSAPI where the user logged in to the local machine with a different case of username to the (case-sensitive) Kerberos username. Falls back to GetUserName as before if that doesn't work (for machines not on a domain, and Win9x). Based on a patch by SebastianUnger. check-in: 2080e9716a user: jacob tags: trunk
2010-03-14
13:58
r8854/5 broke compilation with Gtk 1.2. Grow a hack to cope. check-in: 97d481dae0 user: jacob tags: trunk
2010-03-13
09:14
I think r8738 broke IPv6 in MSVC Windows builds due to conflict with the WspiapiGetAddrInfo wrapper for getaddrinfo() in MSVC. Split GET_WINDOWS_FUNCTION into two variants, one with the old behaviour (bypassing the preprocessor) and another with the new behaviour (for ANSI/Unicode, although it's not actually used anywhere currently). check-in: 731886a245 user: jacob tags: trunk
08:47
Tweak description of dynamic port forwarding, and point people running into 'Out of space for port forwardings' at it. check-in: 0e44be0bf1 user: jacob tags: trunk
2010-03-06
09:50
Centralise generation of the control sequences for arrow keys into a function in terminal.c, and replace the cloned-and-hacked handling code in all our front ends with calls to that. This was intended for code cleanliness, but a side effect is to make the GTK arrow-key handling support disabling of application cursor key mode in the Features panel. Previously that checkbox was accidentally ignored, and nobody seems to have noticed before! check-in: 35aecab820 user: simon tags: trunk
2010-02-20
13:15
Unix console utilities should send prompts to /dev/tty or failing that stderr, not to stdout. check-in: d32827a7f2 user: simon tags: trunk
13:06
Colin Watson reports that linking with 'gold' doesn't work, because PuTTY makes explicit use of libX11 without including -lX11 on the link line. (GNU ld appears to pull in libX11 automatically because it's needed for the dependencies of GTK, but gold expects that dependency to be satisfied at run time via DT_NEEDED and hence doesn't bother.) Hence, add explicit -lX11 to both Makefile.gtk and the autoconf world. check-in: b7eb6b8ae9 user: simon tags: trunk
05:21
Update to r8614: another -D_FORTIFY_SOURCE=2 fix. check-in: a89fe5a769 user: simon tags: trunk
2010-02-17
13:02
Null out the socket pointers in X- and port-forwarding channels for which we close the socket without destroying the channel. John Peterson reports periodic crashes under heavy load which appear to be fixed by this, though I don't know the exact circumstances induced by that load. check-in: 40866f6b70 user: simon tags: trunk
2010-01-25
08:33
...and the rest of r8854. check-in: 698420e57a user: jacob tags: trunk
2010-01-23
06:25
Our handling of timers in Gtk was truncating times on 64-bit systems; one symptom was that the terminal window would not update until a focus-change event. Spotted and patched by Max Kellermann. check-in: d38cce3d87 user: jacob tags: trunk
2010-01-17
17:53
Revert r8847, which was bilge; I can't magically change the order of a tree just by giving a different sorting function to find234(). check-in: c2eb6eced0 user: jacob tags: trunk
11:27
It's a new year. check-in: 396c88ece5 user: jacob tags: trunk
10:22
Change expiry of timers when their contexts go away from lazy to eager. Intended to be of benefit to derived code making many connections from a single process. check-in: bb1cad5917 user: jacob tags: trunk
10:20
Plug a few minor memory leaks, based on a patch by Sirp Potijk. While I'm here, add an assertion in sshrand.c to catch mistakes in reference counting. check-in: fecf1a52c9 user: jacob tags: trunk
2009-11-22
13:10
On Windows, character set specifications of the form 'IBM437' would never have worked due to a typo. Spotted by Todd Burkey. check-in: 395ba90760 user: jacob tags: trunk
2009-11-13
07:24
Add a keyboard shortcut for the "serial" protocol to the GUI. Will cause non-zero, but hopefully acceptable, disruption to people's finger macros. check-in: b79ee3085f user: jacob tags: trunk
2009-11-10
13:14
Patch from Tim Kosse to fix 64-bit-cleanness in SHA-512. check-in: d32d173608 user: simon tags: trunk
2009-11-08
13:25
We defined tried_shgetfolderpath but never actually set it. Harmless, but fixed. check-in: e07225584a user: jacob tags: trunk
13:22
Use DECL/GET_WINDOWS_FUNCTION in a few more places in place of ad-hoc GetProcAddress(). check-in: de2a5fba6a user: jacob tags: trunk
12:47
Move the two existing DECL/GET_foo_FUNCTION macro sets used for dynamic linking on Windows into a single global one, which can cope with function renaming. Intended to enable eventual removal of ANSI-specific DoSomethingA references (although I've not removed any). check-in: 10f4a37d77 user: jacob tags: trunk
12:25
Improve buffer handling in Windows sk_getaddr() -- we were passing uninitialised storage into WSAAddressToString()'s length function (and presumably getting away with it by luck). Also improve error handling (exposed by my Wine installation, which returns an error from WSAAddressToString() for connections to localhost for some reason). check-in: 6f1dcc5227 user: jacob tags: trunk
2009-11-01
16:06
Stop trying to enumerate all the kinds of Windows we support on the download page. Define in more detail what we mean by "Windows" in the Ports section of the FAQ. check-in: 14ddde52f8 user: jacob tags: trunk
2009-09-27
11:20
Remove is_shift_pressed() -- it's not been used since r4906. check-in: 63058ec840 user: jacob tags: trunk
11:07
Another warning fix and cosmetic tweakage. check-in: 24756eb643 user: jacob tags: trunk
10:52
Quell more warnings and, perhaps, avoid alignment faults on 64-bit Windows. check-in: d56656f7b8 user: jacob tags: trunk
10:31
Fix some (probably harmless) warnings. check-in: 95f383c5c3 user: jacob tags: trunk
2009-09-25
18:32
Change manifest files to declare Windows GUI apps to be "DPI-aware", that is, not fazed by being displayed at other than 96DPI; testing on Vista at a range of DPIs indicates that we cope (with the minor and inevitable exception of the drag-list control). This stops pixel scaling and hence fuzzy display on high-resolution displays. (Hope this is last disastrous than my last set of manifest tweaks! -- <http://support.fogcreek.com/default.asp?copilot.6.26840.1> suggests that this is an OK thing to do.) check-in: e4ebebae53 user: jacob tags: trunk
2009-09-16
17:28
Fix minor file descriptor leaks. Found by cppcheck, reported by Tim Kosse. check-in: f22fd7eb98 user: jacob tags: trunk
2009-09-14
16:26
Since r7266, it's been possible to get a hostname into Default Settings; but plink did not cope gracefully with this -- it was not possible to override that hostname on the command line (attempts at doing so would be treated as part of the remote command). Fix this by applying the principle of r7265: if the user didn't explicitly specify that they wanted to launch the hostname in the default (for instance with '-load "Default Settings"', we assume they don't want to, and such a hostname doesn't count when deciding whether to treat a non-option argument as hostname or command. check-in: 20880a1ebe user: jacob tags: trunk
2009-09-13
18:41
In Unix PuTTY, grey out "Restart Session" when it doesn't apply (as the Windows version does), rather than hiding it completely. check-in: 239594768a user: jacob tags: trunk
18:37
Add a couple of ellipses in Unix context menu (like r759 on Windows). check-in: 0a2d6244f2 user: jacob tags: trunk
18:29
If there are no saved sessions, put a grayed "(No sessions)" entry on the saved sessions submenu of the terminal window context menu (as Pageant does), rather than an empty menu (which often renders poorly). check-in: 67bc4c7b05 user: jacob tags: trunk
2009-08-30
08:16
Avoid compiling autoconf test programs with -Wall -Werror; doing so causes trouble on Ubuntu, where the Gtk test programs don't check the return value from system() and thus fall foul of the combination of our -Werror and <https://wiki.ubuntu.com/CompilerFlags#-D_FORTIFY_SOURCE=2>. check-in: 0516506708 user: jacob tags: trunk
06:09
Minor improvements to error reporting in logging. check-in: f5f8c5e862 user: jacob tags: trunk
2009-08-21
18:25
Remove outdated comment. check-in: 337a48e8d8 user: jacob tags: trunk
17:29
From Corey Stup: when we're declaring stuff for WSAAddressToStringA, we should use the explicitly-narrow type LPSTR, not the switchable type LPTSTR. (Since we currently build without UNICODE this makes no practical difference to us now.) check-in: 911d1f3e09 user: jacob tags: trunk
16:16
Corey Stup points out a memory leak in the local-proxy implementations. check-in: d2d15b58f4 user: jacob tags: trunk
15:05
Corey Stup points out that any attempt to display the message "Unable to load any WinSock library" will lead to a segfault. check-in: 71f110ef4b user: jacob tags: trunk
2009-08-18
18:51
Attempt to filter out duplicate port forwardings in the GUI. check-in: a55940aad5 user: jacob tags: trunk
18:38
Fix handling of duplicate port forwardings; they were effectively cancelling out, but are now just ignored. (We should make more effort to prevent duplicates before they get as far as ssh_setup_portfwd() -- it's currently trivially easy to enter them in the GUI and on the command line, let alone both -- but there's bound to be someone with a saved session containing dupes out there by now, and anyway there are duplicates we can't detect before getting this far, for instance "1234:localhost:22" vs "1234:localhost:ssh".) check-in: 16f350f6b0 user: jacob tags: trunk
2009-08-16
17:51
Quell "config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting" warning when running ./configure, per <http://www.gnu.org/software/autoconf/manual/html_node/Changed-Directory-Variables.html> check-in: dfb13212a3 user: jacob tags: trunk
2009-08-15
12:45
Keep the state of the "Full Screen" menu item on the Ctrl+right-click context menu in sync with reality and the system menu. check-in: 8ce7de2804 user: jacob tags: trunk
2009-08-13
17:01
Add "-serial" to Plink's usage message. check-in: db550eade7 user: jacob tags: trunk
2009-08-10
15:55
Patch from Alan Clucas (somewhat polished) providing command-line options to select and configure serial port mode. check-in: 8384fb9144 user: simon tags: trunk
15:38
Fixes for re-entrant calls in the serial configuration list boxes. (I'm starting to think I made an egregious design error somewhere in this mechanism.) check-in: aa0d4a985b user: simon tags: trunk
2009-08-06
19:19
Workarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which doesn't like you to ignore the return value from read()/write()/etc (and apparently can't be shut up with a cast to void). check-in: c1918bea98 user: jacob tags: trunk
17:55
More use of sockaddr_union (above and beyond that necessary to remove current warnings). check-in: a341764006 user: jacob tags: trunk
17:12
Avoid "dereferencing pointer 'sa' does break strict-aliasing rules" warnings from recent versions of GCC. check-in: bbcbaf04fd user: jacob tags: trunk
2009-07-28
18:45
Alex Besogonov suggests that our Unix autoconf GSSAPI library search order is sub-optimal -- apparently it prefers shishi above Heimdal, and apparently that's bad. check-in: 3e52850b91 user: jacob tags: trunk
18:30
Mention Makefile.ux. Be less certain about the possibility of building with vanilla VC6. Provide more details of actively tested toolchains. check-in: 1cf3100f88 user: jacob tags: trunk
18:20
Include putty.h (and hence uxconfig.h) before testing for NO_GSSAPI, so that "./configure --without-gssapi" actually works. Spotted by Rob Shinn. check-in: 8a134cc73a user: jacob tags: trunk
2009-07-12
07:02
Typo: replace a \i with a \I. check-in: 3c79a67214 user: simon tags: trunk
2009-06-10
12:42
Clearing and refilling the code-pages list box can cause a re-entrant call to its handler in config.c, which destroys the previous value in cfg->line_codepage. Therefore, preserve the right value in an automatic variable until all the re-entrant calls have finished. check-in: 456fa805f5 user: simon tags: trunk
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
2008-11-24
17:56
I think sshgss.h needs puttyps.h for Ssh_gss_buf. Makes it compile for Windows, anyway. check-in: 67d7ae7d6f user: jacob tags: trunk
17:44
Change how we handle the Ssh_gss_buf type. Previously, we defined it ourselves, but on Unix then assumed it was compatible with the system's gss_buffer_desc, which wasn't the case on LP64 systems. Now, on Unix we make Ssh_gss_buf into an alias for gss_buffer_desc, though we keep something similar to the existing behaviour on Windows. This requires renaming a couple of the fields in Ssh_gss_buf, and hence fixing all the references. Tested on Linux (MIT Kerberos) and Solaris. Compiled on NetBSD (Heimdal). Not tested on Windows because neither mingw32 nor winegcc worked out of the box for me. I think the Windows changes are all syntactic, though, so if this compiles it should work no worse than before. check-in: 68eb6751c6 user: ben tags: trunk
12:19
Treat lines starting with '#' as comments in PSFTP. check-in: 2f3fc67a1b user: jacob tags: trunk
11:51
New option to allow use of the local OS username for login to the remote side if we have no better ideas, with UI shamelessly stolen from Quest PuTTY. Off by default, which effectively reverts the change to using the local username by default that came in with GSSAPI support in r8138. Anyone wanting seamless single sign-on will need to set the new option. (The previous default behaviour was getting in the way in ad-hoc scenarios.) Note that the PSCP and Unix-Plink behaviour of using the local username by default have remained unchanged throughout; they are not affected by the new option. Not sure if that's the Right Thing. check-in: ce33b58a4d user: jacob tags: trunk
2008-11-23
14:11
Make key file import robust against a PPK file that has somehow lost its final newline. From Debian bug #414784, based on a patch by Justin Pryzby. check-in: fcd0e1e4f9 user: jacob tags: trunk
2008-11-22
16:49
Autoconfiscate GSS-API support, including support for manually disabling it. check-in: c502d27121 user: ben tags: trunk
16:06
Changes to make this compile on Solaris 9: use <gssapi/gssapi.h> rather than <gssapi/gssapi_krb5.h> and provide the OID for Kerberos 5 ourselves (since it's a known constant). I'm not sure this actually works on Solaris yet, mind. check-in: 37ec80dd2c user: ben tags: trunk
2008-11-17
12:38
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. check-in: 8eda1bb259 user: simon tags: trunk
12:36
Avoid freeing the backend in notify_remote_exit(), since that's called from within a backend function which will expect its own backend pointer to still be valid on return. Instead, move all the real functionality of notify_remote_exit() out into a GTK idle function. check-in: d576de5599 user: simon tags: trunk
2008-11-11
01:47
In SSH packet logging mode, log SSH-2 packet sequence numbers, in both directions. We had a bug report yesterday about a Cisco router sending SSH2_MSG_UNIMPLEMENTED and it wasn't clear for which packet; logging the sequence numbers should make such problems much easier to diagnose. (In fact this logging fix wouldn't have helped in yesterday's case, because the router also didn't bother to fill in the sequence number field in the SSH2_MSG_UNIMPLEMENTED packet! This is a precautionary measure against the next one of these problems.) check-in: e2d3df5243 user: simon tags: trunk
2008-11-08
10:58
Implement sk_addr_dup(). check-in: eed2c42118 user: simon tags: trunk
10:45
Move out of the SockAddr structure the mutable fields "ai" and "curraddr", and turn "family" into a macro-derived property of the other fields. The idea is that this renders SockAddrs immutable once created, which should open up the possibility of duplicating and reusing one without having to redo the actual DNS lookup. I _hope_ I haven't broken anything. The new code architecture contains several rather dubious-looking operations (namely the arbitrary choice of the first returned address in functions like sk_getaddr and sk_address_is_local - what if, for instance, a DNS lookup returned a local and a non-local address?), but I think they were functionally just as dubious beforehand and all this change has done is to make them more obviously so to a reader. check-in: d1441c22fa user: simon tags: trunk
2008-10-17
15:55
Patch from Iain Patterson: fix crash on Windows when GSSAPI auth is attempted but fails for some reason (such as not having a tgt for the server's realm). check-in: a90338986b user: jacob tags: trunk
2008-10-13
17:34
Rejig the Translation panel controls and documentation to remove the emphasis on received data. Experiment and suggestion suggest that the character set configuration applies equally to keystrokes sent to the server, or at least that that's close enough to being true that we should document it as a first approximation. check-in: 3a5b181634 user: jacob tags: trunk
17:16
Erroneously invisible index term. check-in: ede5168844 user: jacob tags: trunk
2008-10-12
06:32
Fix inability to save session on Unix when ~/.putty doesn't exist introduced in r7934. check-in: cbe8f19c30 user: jacob tags: trunk
2008-10-08
13:09
Ahem. Make sure I NULL out any unused pointer field that I later plan to free if it isn't NULL. check-in: 040933bf65 user: simon tags: trunk
2008-10-07
12:48
sshrsa.c now obeys the RFC793 Robustness Principle when it comes to the ordering of the primes in a fully specified RSA private key: when the key format typically has p > q, it will always output p > q but be willing to tolerate p < q on input. (Inspired by seeing an OpenSSH-format key file in the wild which had p < q, which I've never seen before; I suspect a third-party application incautiously generating the format.) check-in: 1b00ac1adf user: simon tags: trunk
2008-09-25
14:00
The "server refused our key" bit didn't link to the public-key auth chapter, which has some hints on server-side setup. Now it does. check-in: 08e05fbf90 user: jacob tags: trunk
2008-09-21
15:39
Document that PSFTP's "open" command allows an optional port number. check-in: f83a6f7414 user: jacob tags: trunk
2008-09-16
17:56
Further correction: on reflection, after examining all the call sites for uint64_make(), we _shouldn't_ attempt to preserve high bits in the low-order argument; it turns out not to be what the call sites want. check-in: b04b998cac user: simon tags: trunk
13:21
64-bit cleanliness in int64.c. This is all hideous; really I ought to be trying harder to find a 32-bit type rather than making a uint64 structure out of two potentially 64-bit unsigned longs. And really I ought to be using the C99 64-bit integers anyway if they're available. But this should do for the moment. check-in: cde23091b0 user: simon tags: trunk
07:48
Tim Kosse points out that xfer_upload_gotpkt can return a negative value on error, so the check at the call site shouldn't test for exactly zero. check-in: 306307fcbb user: simon tags: trunk
2008-09-14
10:11
Some Windows keymaps, it turns out, don't translate the key combination Ctrl + \ as the Ctrl-\ character. All of mine have, but at least one laptop turns out not to. Do so explicitly. check-in: 0d25c5708a user: simon tags: trunk
2008-09-09
15:36
If we got a keyboard-interactive INFO_REQUEST with an "instruction" string but no actual prompts, we weren't displaying the former, which was wrong. We should now (although I haven't found a server to test it against). check-in: 223743ea02 user: jacob tags: trunk
2008-09-01
12:56
Fix punctuation in the large print statements. In particular, one semicolon which crept in in r8138 was causing a lot of the "make install" implementation to be missing from Makefile.gtk. check-in: 7d7ed70323 user: simon tags: trunk
2008-08-31
16:45
Good grief. When I originally wrote the local proxy code two years ago, I apparently caused all data received from local proxies to be unconditionally tagged as TCP Urgent. Most network backends ignore this, but it's critical to the Telnet backend, which will ignore all Urgent-marked data in the assumption that there's a SYNCH on its way that it should wait for. Nobody has noticed in two years, presumably meaning that nobody has ever tried to do Telnet over a local proxy in that time. check-in: 6610bc874d user: simon tags: trunk
14:18
Colin Watson points out an apparently erroneous cast: Ssh_gss_name and gss_name_t are supposed to be congruent types, so a pointer to one should never be cast to a non-indirect instance of the other. check-in: 784bafd53c user: simon tags: trunk
12:12
Minor code cleanup: I just happened to be looking at this file for other reasons and I noticed that the list of TELOPTs is given twice and hence needs to be kept in sync. Replace with my now-standard second-order-macro approach which allows the list to be maintained in only one place. check-in: c592900d31 user: simon tags: trunk
2008-08-20
17:21
Fix for portfwd-addr-family: on Unix, when a tunnel is specified as "Auto" (rather than IPv4 or IPv6-only; this is the default), try to open up listening sockets on both address families, rather than (unhelpfully) just IPv6. (And don't open one if the other can't be bound, in a nod to CVE-2008-1483.) Based on a patch from Ben A L Jemmett. check-in: 25ce0f7899 user: jacob tags: trunk
2008-08-11
13:03
James has made the URL syntax for http://svn.tartarus.org/ more sensible. Update the FAQ link to it. check-in: 8660ab09c4 user: simon tags: trunk
2008-08-10
09:28
Link to pTerm, an SSH client for the iPhone that's apparently based on PuTTY. Attempts at damage limitation from the name similarity with pterm. Also try to refresh the ports section of the FAQ a bit. check-in: 36e8cf9a15 user: jacob tags: trunk
08:10
Initial commit of GSSAPI Kerberos support. check-in: 483e1ff871 user: owen tags: trunk
2008-07-19
11:41
www.winputty.com check-in: 9e6f8924f9 user: jacob tags: trunk
2008-07-18
16:39
Another, subtly different version string for ssh2-bug-maxpkt, from Tim Kosse. check-in: 9b020a65b0 user: jacob tags: trunk
2008-07-17
12:01
At least one version of gcc won't figure out that "clear" is never read uninitialised (because the only circumstance under which it isn't initialised is when "update" is FALSE, in which case it isn't read either). Placate it. check-in: dc3f5d00d0 user: simon tags: trunk
2008-07-11
14:24
Replicate r8110 from PSFTP to PSCP, and various other minor patchery from Roger Picton. check-in: 85e8a600c9 user: jacob tags: trunk
2008-07-06
07:24
Patch from Tim Kosse: check back->exitcode() in both loops on ssh_sftp_loop_iteration(), not just one. Fixes exiting on a negative response to the host key confirmation prompt on Windows (because winsftp.c doesn't have the equivalent of uxsftp.c's no_fds_ok); on Unix it worked already but gave a suboptimal error message, which is fixed too by this patch. check-in: 69902ee8df user: simon tags: trunk
07:11
Patch from Tim Kosse to make PSFTP remember to close files on various error conditions. check-in: e85a6b6c59 user: simon tags: trunk
2008-06-29
04:14
Patch from Aidan Kehoe to extend the Arabic shaping code to Urdu and Persian, by adding some additional Unicode code points to the shapetypes[] array. check-in: 7ade9c8573 user: simon tags: trunk
2008-06-15
08:26
Cosmetic: use `appname' in more places, so that Unix PuTTYtel announces itself thus. check-in: 4de88a2ca4 user: jacob tags: trunk
07:39
Exorcise beeps from the Colours pane in Gtk. The colour list box beeped at the user whenever it found that something other than exactly one colour was selected. This seems to happen implicitly in Gtk when the pane is changed. In Gtk1, this gave you a beep whenever you left the Colours dialog after having selected a colour from the list; in Gtk2, you additionally got a beep _every_ time you subsequently re-entered the Colours dialog (for reasons I haven't investigated). Windows was unaffected. Also, in Gtk (unlike Windows), it's possible for the user to go back to the state where no items in the list box are selected at all. For these reasons, stop beeping at the user, and instead blank the RGB edit boxes as a hint that edits to them would be futile. (Really we should be disabling them entirely, but the cross-platform edit controls aren't up to that yet.) check-in: 5f0e743092 user: jacob tags: trunk
2008-06-11
13:03
Work around a bug in early versions of GTK (which I'm still forced to use, gah) in which the "model" argument to gtk_tree_selection_get_selected_rows() couldn't be NULL. check-in: 2154cd8b63 user: simon tags: trunk
2008-06-10
15:18
Manfred Schwarb points out that scroll wheel support stopped working with the switch to GTK2. This turns out to be because, where GTK1 represented the scroll wheel as mouse buttons 4 and 5 and generated GdkEventButton when it was moved, GTK2 has moved wheel actions out into a new event type GdkEventScroll which we were not handling. Now we do, so scroll wheel support should be back in place. check-in: e42aacd383 user: simon tags: trunk
2008-06-07
11:30
Manfred Schwarb also mentions that Alt+drag is captured by at least one well known window manager (KDE's); document that Shift+Alt+drag is worth trying as a workaround. check-in: cc7bc47f00 user: simon tags: trunk
11:25
Manfred Schwarb points out that the README contains an outdated comment about GTK 2 not being supported. check-in: 00e544e03f user: simon tags: trunk
2008-06-05
12:06
Add an include statement to Makefile.gtk that imports if present a file called Makefile.local. This means that if you're compiling on a platform that needs COMPAT definitions, you can put them in a local file and not have to type them on the command line every time. check-in: 8d02b7f8a5 user: simon tags: trunk
2008-06-04
18:12
Bah, there's always something. Check in missing files. check-in: 76e3fc452e user: simon tags: trunk
18:05
At last, merge the putty-gtk2 branch back into the trunk! check-in: 8d6cccb962 user: simon tags: trunk
2008-06-01
06:16
Been meaning to do this for years: introduce a configuration option to manually tweak the host name and port number under which the SSH host key is read and written. I've put it in the cross-platform Connection panel. Partly under the flimsy pretext that other backends _can_ use it if they so wish (and in fact it overrides the host name for title-bar purposes in all network backends, though it has no other effect in anything but SSH); but mostly because the SSH panel was too full already :-) check-in: 8d27b54607 user: simon tags: trunk
2008-05-31
12:22
Apparently Vista's printf-like functions don't support %n by default. We could explicitly re-enable %n, but we only use it in one place, so take the path of least resistance and remove that single instance. This stops dupvprintf() getting stuck in a loop (a behaviour that's caused by a workaround for a broken libc). <http://msdn.microsoft.com/en-us/library/ms175782(VS.80).aspx> check-in: d8ce60fff0 user: jacob tags: trunk
12:11
Update for `win-randseed-location' fix. check-in: a8911a191e user: jacob tags: trunk
2008-05-28
14:23
OS X Leopard, it turns out, has a new and exciting strategy for addressing X displays. Update PuTTY's display-name-to-Unix-socket- path translation code to cope with it, thus causing X forwarding to start working again on Leopard. check-in: c736a90b9d user: simon tags: trunk
2008-05-21
04:48
Update the FAQ to state more explicitly that PuTTY contains no OpenSSL code. check-in: f4c171b73f user: simon tags: trunk
2008-04-26
13:45
Mention Vista. check-in: 815056aeda user: jacob tags: trunk
2008-04-11
08:28
Utterly hideous new approach to extracting install-sh from the autoconf/automake edifice, since my previous approach of guessing its pathname turns out not to work on at least one kind of system. check-in: 287896a14e user: simon tags: trunk
2008-04-05
07:26
Fix misleading parameter name. check-in: 83d355fd62 user: jacob tags: trunk
2008-03-22
07:01
For convenience of debugging, and perhaps some real convenience at some point too: introduce a bunch of environment variables which can override Unix PuTTY's usual idea of where to find its dotfiles. Setting PUTTYDIR moves the entire ~/.putty directory; setting PUTTYSESSIONS, PUTTYSSHHOSTKEYS or PUTTYRANDOMSEED move specific things within that directory. While I'm here, also be prepared to fall back to password file lookups if $HOME is undefined (though we still use $HOME in preference when it is defined, because that's polite and useful). Also, on general principles, tweak the make_filename() function prototype so it doesn't rely on fixed-size buffers. check-in: 7ecb4b4bc7 user: simon tags: trunk
2008-03-09
10:32
Under OS X Leopard, we seem not to consistently get the Tab key translated for us. Be prepared to do it manually as a fallback. check-in: 8b0a99a8f7 user: simon tags: trunk
2008-03-07
12:30
Fix a cursor positioning infelicity. The scenario: I start a small, say 80x24, pterm. I do some work in it, generating plenty of scrollback, and eventually I `less' a file. `less' switches to the alt screen. Then I want more vertical space to look at the file, so I enlarge the window to more like 80x60. When I quit `less' and switch back to the primary screen, some scrollback has been pulled down into the screen, as expected - but the saved _cursor position_ is still at line 24, not at the bottom of the new terminal where the prompt it goes with has moved to. Solution: term_size() should adjust the alt-screen saved cursor positions as well as the normal cursor position. (Curiously, the problem doesn't happen on my home Debian box, even without this fix. It happens on my RH9 box at work, though.) check-in: b77fd65b64 user: simon tags: trunk
2008-02-23
18:16
It's a new year (and we've even made a code checkin). check-in: 52b6ccc5d2 user: jacob tags: trunk
17:56
Attempt to clarify what the various IP version selection options do. check-in: fd98031fc4 user: jacob tags: trunk
16:00
Tunnels: more explicit link from introductory to reference section. check-in: 5164efaa42 user: jacob tags: trunk
2008-02-21
03:18
Aha, _that's_ why I've been periodically getting blocking-write problems using Unix PuTTY port forwarding. Sockets we create by connect() are immediately set into nonblocking mode by fcntl, but sockets we create by accept() were not. This trivial fix should help. check-in: 995c027a64 user: simon tags: trunk
2008-02-10
08:00
Update web-SVN URL for kh2reg.py. check-in: 8a0301e741 user: jacob tags: trunk
2008-01-09
13:59
Typo in winadj@ name. check-in: d30396f5da user: jacob tags: trunk
2007-12-20
05:03
Make the text about our interest in new mirror sites significantly less fluffy and welcoming. check-in: b64dc037fe user: simon tags: trunk
2007-12-15
04:41
r7804 neglected to add a help context #define to winhelp.h. check-in: d69d2d5b8a user: simon tags: trunk
2007-12-04
18:28
Document maxpkt bug under garbled packet error message. check-in: dae6eba3a9 user: ben tags: trunk
18:02
Add a new bug-compatibility mode that limits the window size we'll advertise so that the server can't exceed our maximum packet size. Enable it for "1.36_sshlib GlobalSCAPE" which apparently sends oversize packets otherwise. check-in: 9d67c9cd70 user: ben tags: trunk
2007-11-28
14:45
Duplicate r7795 in uxnet.c. check-in: dfae3756d5 user: simon tags: trunk
2007-11-26
15:09
sktree is indexed on the numeric value of the socket structure's underlying WinSock SOCKET. Therefore, if we plan to modify the SOCKET in a socket, we must remove it from the tree before doing so, and put it back again afterwards. Otherwise it'll violate the tree's sorting order, and sooner or later someone will try to find it and get back NULL. check-in: 410b9389c7 user: simon tags: trunk
2007-10-27
11:05
Reset mouse reporting mode as part of resetting the terminal. check-in: ae3240f75a user: jacob tags: trunk
2007-10-19
16:47
Marc TERRIER pointed out a couple of places that claim there is an X11 forwarding checkbox on the Tunnels panel, which hasn't been the case for a while. check-in: 58397930f6 user: jacob tags: trunk
2007-10-03
16:21
Replace mentions of SSH-2 I-Ds with references to the corresponding RFCs. check-in: b858df6074 user: ben tags: trunk
16:06
snew() always returns non-NULL, so checking if its return value is NULL is pointless. check-in: d6878a67b7 user: ben tags: trunk
16:04
Factor out the increasingly complicated SSH-2 channel structure initialisation into its own function. Maintaining four copies was getting boring. check-in: 88fdee8c45 user: ben tags: trunk
15:29
Take the code that does flow control in SSH-1, and make it work in SSH-2 as well. This won't be triggered in the usual case, but it's useful if the remote end ignores our window, or if we're in "simple" mode and setting the window far larger than is necessary. check-in: b54b9c2617 user: ben tags: trunk
2007-10-02
16:43
More fixes to stdout and stderr. When the backlog on either clears, call the backend's unthrottle function. If we don't, we'll deadlock. While we're here, also pump as much data as possible out during each call to try_output(), rather than restricting ourselves to a single call to write(). check-in: 11f55e6d5e user: ben tags: trunk
16:07
As far as I can see (at least in NetBSD) O_NONBLOCK and FIONBIO are equivalent, except that O_NONBLOCK is standardised and FIONBIO isn't. In consequence, replace our only use of FIONBIO with O_NONBLOCK. Inspired by Jonathan H N Chin, who had problems with this on Solaris. check-in: 8b7c139db9 user: ben tags: trunk
2007-10-01
16:11
Rather than rejecting spurious SSH_MSG_CHANNEL_SUCCESSes, and ignoring spurious SSH_MSG_CHANNEL_FAILUREs, treat them as the protocol errors they are and forcibly disconnect. Inspired by recent traffic on comp.security.ssh. check-in: d719c8cbfb user: ben tags: trunk
2007-09-30
14:42
Merge the looking up of channel numbers for SSH-2 channel messages into a single function which also handles checking that channels exist and are properly open. This should make PuTTY a little less tolerant of servers that send bogus messages. check-in: 6018bf7894 user: ben tags: trunk
09:14
Set cfg.ssh_simple if there are no forwardings. check-in: 7d1a0e3e3f user: ben tags: trunk
07:45
When writing session data to stdout or stderr, switch the relevant file descriptor into non-blocking mode temporarily, and correctly handle returns of EAGAIN from write(). This should fix unix-plink-stdout-nonblock, while avoiding EAGAIN turning up where we aren't expecting it. check-in: 5b2a52933a user: ben tags: trunk
2007-09-29
09:20
Now that PuTTY is actually using names "@putty.projects.tartarus.org", it seems like a good idea to document them. check-in: 9785ec086d user: ben tags: trunk
07:27
Add support for resetting the terminal modes on stderr to something sensible before printing error messages to it. This should fix the stair-stepping in Plink's progress messages. check-in: d7084e099b user: ben tags: trunk
2007-09-24
16:43
My changes in r7738 (O_NONBLOCK for Unix Plink) were half-arsed, and completely broke interactive logins. The problem, or at least one of the problems, was that in interactive use stdin, stdout, and stderr tend to be the same file, so setting O_NONBLOCK on the latter two also sets it on the former. Thus, we need to cope with all of them being non-blocking. check-in: 182955cf8e user: ben tags: trunk
16:31
Manifest constants are good. Introduce plink to STD{IN,OUT,ERR}_FILENO, TRUE, and FALSE. check-in: 2f675b3360 user: ben tags: trunk
14:26
stdout and stderr should be made O_NONBLOCK so that we don't end up blocking the entire process because stdout is busy. Arguably, this shouldn't apply to stderr when we're printing our own error messages to it, but I'll leave that fix for another time. check-in: 1b815caadf user: ben tags: trunk
10:18
Add support for automatically tuning the SSH-2 window size for decent performance. The theory behind this is fairly simple, though the implementation turns out to be a little trickier than it looks. The basic idea is that when the connection isn't being limited by our ability to process data, we want to ensure that the window size _as seen by the server_ never drops to zero. Measuring the server's view of the window size is done by arranging for it to acknowledge every SSH_MSG_CHANNEL_WINDOW_ADJUST, or rather an SSH_MSG_CHANNEL_REQUEST sent just before it. That way we can tell when it its outgoing data stream it received the window adjustment, and thus how small the server's view of the window got. At present, we only ever increase the window size. In theory, we could arrange to reduce it again if the server's view of it seemed to be persistently too large, but my experiments suggest that getting this right will be tricky. check-in: b331d3a1cc user: ben tags: trunk
2007-09-22
08:55
Document "No supported authentication methods available", and make it clear that TIS/CryptoCard auth can be used for simple passwords too. check-in: 69609a5352 user: ben tags: trunk
2007-09-21
13:04
Harvey Kwok observes that EnumPrinters() can sometimes fail to fill in its output parameters. Hence, we initialise them before calling it. check-in: 53371bfba6 user: simon tags: trunk
2007-09-20
16:33
Don't try SSH-1 RSA authentication unless the server has advertised support for it. It's possible that this obsoletes BUG_CHOKES_ON_RSA. Certainly the one SSH-1.5-Cisco-1.25 server I found was correctly not advertising RSA auth. For now, leave it in, because I'm not feeling entirely confident. check-in: af3b8d40a9 user: ben tags: trunk
16:07
In SSH-1, don't attempt password authentication unless the server has announced support for it. Instead exit with a fatal error (since password auth is our last resort). check-in: 04c6df563b user: ben tags: trunk
2007-09-03
15:52
Avoid "unused variable" warning when NO_IPV6 defined. check-in: 82315782e0 user: ben tags: trunk
15:33
Suggest another ttymode we could usefully set automatically. check-in: 925c2124be user: ben tags: trunk
14:09
ssh->mainchan can be NULL; try not to segfault in that situation. check-in: 757a472316 user: simon tags: trunk
2007-08-07
17:02
Correctly terminate nc target hostname when copying it. While we're here, use memcpy rather than strncpy when we've already worked out how much we're going to copy. check-in: 2e76e0d01d user: ben tags: trunk
2007-08-06
15:56
Use "int" rather than "unsigned" as the argument to ssh2_set_window, not because it can ever be negative, but because we'll be comparing it with another int. This way, C's promotion rules don't bite us and we should stand slightly more chance of coping with broken servers that overrun our window. check-in: 126f2ed4f1 user: ben tags: trunk
2007-08-05
17:18
May as well reference an RFC rather than an Internet Draft where we can. check-in: 24a823b68f user: ben tags: trunk
09:18
Small window-handling tweaks. Set the default big window to 0x7fffffff bytes, and tweak ssh2_set_window() so it can cope with that. Also arrange to send a private channel message in simple mode to tell the server that it can safely use a large window too. check-in: 7975f8a4ec user: ben tags: trunk
2007-08-04
17:19
Remember to clear ssh_simple when initialising config. check-in: 5a27b7939e user: ben tags: trunk
17:14
In the file-transfer applications, which only ever use the main channel, arrange to set the SSH-2 window size to something very large. This prevents the connection stalling when the window fills up, and means that PSCP receives data _much_ faster. check-in: 0ce59e00b7 user: ben tags: trunk
14:16
"CR implies LF" patch, based on one from Paul Coldrey. check-in: 7b3639872d user: ben tags: trunk
11:04
Tweak window handling so that we send a window adjust if the window is half used up, rather than over half. That this increases the throughput of PSCP by 50% indicates just how broken our window handling is. check-in: 6d0869b7d6 user: ben tags: trunk
10:48
When omitting session data from logs, don't omit the length of the session data string. This isn't strictly necessary, but it makes the logs easier to use. check-in: abde6881f2 user: ben tags: trunk
09:32
Tweak to window handling: Keep the local window in a signed integer, and arrange to handle usefully the case where the server sends us more data than it's allowed to. There's no danger of overflow, since the maximum is OUR_V2_WINSIZE and the minimum is -OUR_V2_MAXPKT (at least if the server is nice). check-in: ad4c0912dd user: ben tags: trunk
2007-07-29
09:02
Don't throw away data that we receive before we're ready for it. Just save it up for later. This should prevent hangs when talking to particularly enthusiastic servers. Thanks to JCA for tracking this bug down. check-in: 9eba45566e user: ben tags: trunk
2007-07-22
09:34
Note lack of proxy auto-detection. check-in: 2f7560360f user: jacob tags: trunk
2007-07-21
16:39
Split pkt_ctx into a separate enumeration for each of kex and userauth instead of a bitfield for both. This doesn't gain much here, but it should make it easier to make things other than logging use the context. check-in: 57e427127a user: ben tags: trunk
08:43
Arrange that log_packet() isn't called for raw data logging if logctx is null. This allows us to send data in ssh_init(), albeit at the expense of its not being properly logged, so arrange to send the version string then if that's sensible, which should reduce the number of round-trips required to bring up an SSH-2 connection. check-in: 0c80a9a49b user: ben tags: trunk
2007-07-19
18:53
Separate out the code for creating and sending SSH version strings so that in the SSH-2-only case, we can send it as soon as we connect rather than waiting for the server's one. Unfortunately, actually doing so will take a little more effort -- there are subtleties to do with having a working log context at the right moment that need to be sorted out. check-in: 3341a0fb7c user: ben tags: trunk
2007-07-18
17:54
Update an outdated comment. check-in: bec140c810 user: ben tags: trunk
2007-07-01
10:47
Implement Marcin Bulandra's suggestion of only automatically updating the port number in the GUI when the connection type is changed if the current port number is the standard one for the current protocol. It's not perfect, but it should make the common case of tabbing through the Session panel easier when starting non-SSH connections on odd ports. check-in: 7db7c53371 user: jacob tags: trunk
10:41
Remove port number validation from Windows PuTTY -- it could cause unnecessary trouble with serial connections, and a port number of zero gets caught later anyway. check-in: 865a61887b user: jacob tags: trunk
2007-06-30
16:56
Rationalise access to, and content of, backends[] array. Should be no significant change in behaviour. (Well, entering usernames containing commas on Plink's command line will be a little harder now.) check-in: 8b1d299a90 user: jacob tags: trunk
13:18
Fix a couple of signedness compiler warnings, presumably due to me using a different version of gcc from before. check-in: 97c7062940 user: simon tags: trunk
13:17
Tong Ho points out a missing ssh_pkt_ensure(). check-in: b0ce384018 user: simon tags: trunk
2007-05-29
15:06
Index "MAC" a bit more thoroughly. check-in: 9369ed9aa3 user: jacob tags: trunk
15:01
Explicitly spell out that "incorrect MAC" type errors can be caused by data corruption in the network. check-in: 48b54e0195 user: jacob tags: trunk
2007-05-22
13:37
Retire the e-gold link. Nobody's used it in years; I honestly don't know how I'd go about retrieving money from them any more because my last exchange transaction went through a company who subsequently turned out to be dodgy; and a user points out that e-gold is in legal trouble, which suggests that avoiding it is probably wise. check-in: 7174c42845 user: simon tags: trunk
2007-05-09
16:35
These days, you _can_ save a host name in Default Settings. check-in: 20f0201fe2 user: ben tags: trunk
2007-05-01
15:29
Make bounds of automatic array constant. check-in: 30fcf1a05d user: ben tags: trunk
08:14
Since r7496, Pageant needs sshsh256 to build (although it doesn't need SHA-256 to actually do its job). check-in: fc9bec3e7a user: jacob tags: trunk
07:26
Reindent the section that was marked `XXX The lines below should be reindented before this is committed'. Unfortunately not before it was committed, but you can't have everything :-) check-in: ea1538e924 user: simon tags: trunk
2007-04-30
17:09
Add support for RFC 4432 RSA key exchange, the patch for which has been lying around in my home directory for _years_. check-in: ba69804eab user: ben tags: trunk
15:09
Create installations directories before installing into them, like GNU packages do. Problem reported by Manfred Pausch. check-in: e44d7df824 user: ben tags: trunk
2007-04-29
06:28
Update version numbers for 0.60 release. check-in: 7614cbc865 user: simon tags: trunk
2007-04-22
09:39
Avoid creating the Session/hostport control set in mid-session. check-in: ea6f078243 user: simon tags: trunk
03:56
Capitalisation error. check-in: a43692e9ff user: simon tags: trunk
2007-04-10
16:46
When we get an error writing to a local file, stop the download rather than pretending we just got -1 bytes. Not actually tested, but it looks pretty obvious. Bug reported by dking wang. check-in: 3af8c37407 user: ben tags: trunk
2007-04-02
03:44
When the comments say `if we're in restart mode', the code in question should actually be conditional on restart mode! check-in: 1efe703050 user: simon tags: trunk
2007-03-27
14:10
In the wake of r7415, let's have some better error reporting. Instead of passing -1 to its gotdata and sentdata callbacks on error, winhandl.c will now pass the negation of the Windows error number; and the Plink front end will now format that into an error message and pass it on to the user. check-in: 9fe9b33c47 user: simon tags: trunk
13:49
Windows apparently sends ERROR_BROKEN_PIPE when a pipe we're reading from is closed normally from the writing end. This is ludicrous; if that situation isn't a natural EOF, _nothing_ is. So if we get that particular error, we pretend it's EOF. check-in: 293169b60e user: simon tags: trunk
13:16
Patch from John Sullivan: process double-clicks in the session list box on button-up rather than button-down. The effect of this is that if a saved session is already selected in the list box and then you double-click it, it will open rather than beeping annoyingly. check-in: 7d216c3d83 user: simon tags: trunk
2007-03-19
07:05
Fix a stupid one-character typo that was breaking 256-colour support on GTK. check-in: ee598e12ce user: ben tags: trunk
2007-03-13
09:43
get_random_data() can return NULL (for instance, if we can't open /dev/random on Unix), yet cmdgen failed to deal with this. Spotted by Darren Tucker. check-in: 39d27e9f1d user: jacob tags: trunk
2007-02-28
17:31
Process -t/-T later than -m, so that they can override -m's default behaviour of no pty. check-in: 6ecbbc4f02 user: jacob tags: trunk
15:30
Prepend \\.\ to configured serial line string, to allow easy access to ports above COM9. check-in: 5260ceae34 user: jacob tags: trunk
2007-02-24
20:15
Attempt to scrub -pw's argument in argv[], to make it less obvious. check-in: 20aafd8d77 user: jacob tags: trunk
18:51
Delay evaluating the "-pw" option, so we can criticise the user's choice of backend, bailing out if anything other than SSH is in use. check-in: c4c12aecc8 user: jacob tags: trunk
18:50
Since r7265, a user could not launch a PuTTY session to a specific host by simply specifying a hostname on the command line -- this would bring up the config dialog. Use a slightly more sophisticated notion of whether the user meant to launch a session. check-in: 3be54b7561 user: jacob tags: trunk
16:43
"-noagent" and friends should be marked SAVEABLE, to ensure they're not clobbered by "-load". check-in: e7311276ec user: jacob tags: trunk
07:36
Gareth pointed out yesterday that the Unix terminal front end treats BELL_DISABLED as BELL_DEFAULT. How embarrassing. check-in: 3e3c1216c5 user: simon tags: trunk
2007-02-18
16:05
This reordering of the Unix Makefiles (requested by Michael Shigorin) allows use of -Wl,--as-needed. check-in: fee4847de2 user: jacob tags: trunk
13:56
In controls where a list of entries is manipulated by Add/Remove buttons (SSH tunnels, TTY modes, and environment variables), when the Remove button is pressed, populate the edit controls from the entry that has just been deleted. Several users have requested this, as it makes editing an entry easier (read- modify-write) in the cases where order is unimportant, and also provides a degree of undo-ability. check-in: 847b1e85da user: jacob tags: trunk
13:50
Allow dlg_listbox_index() to be called on multi-selection list boxes. check-in: 375dedc432 user: jacob tags: trunk
09:59
Bring the OS X front end up to date with recent changes to the main code base. check-in: 2798a724a2 user: simon tags: trunk
08:02
Ctrl-Break now sends a Break signal (previously it was equivalent to Ctrl-C). check-in: 65285954f0 user: jacob tags: trunk
2007-02-17
16:33
Use preprocessor trickery to make the signal translation mechanism a little less hideous. The output of the preprocessor should be basically unchanged. check-in: 491721f229 user: ben tags: trunk
16:15
ssh2_set_window checks whether the channel is being closed, so there's no need to check that before calling it. check-in: b91d8b1269 user: ben tags: trunk
11:44
Unbreak "Duplicate session" on Windows, in a similar way to r7291. check-in: de46d1c4c8 user: jacob tags: trunk
2007-02-16
12:44
r7265 broke the legacy `putty @sessionname' construction, which I wouldn't care about except for the fact that it's still used to implement the Saved Sessions menu item in PuTTY and Pageant. check-in: dc0247bf7b user: simon tags: trunk
2007-02-15
17:27
LICENCE in the installer should have CP/M line endings. check-in: 5700f6f2ee user: jacob tags: trunk
2007-02-13
16:57
It turns out that HH_INITIALIZE and HH_UNINITIALIZE are optional, and are for putting HTML Help into "single-threaded" mode. Furthermore, this requires extra work from the application (message pumping via HH_PRETRANSLATEMESSAGE). Thus, remove them and run Help in a secondary thread. This means that keyboard input into the Index and Search tabs now works. check-in: c55f4bfb2d user: jacob tags: trunk
2007-02-11
14:27
Note that htmlhelp.h from HTML Help Workshop works perfectly well with Cygwin. check-in: 4919a4ebcc user: jacob tags: trunk
12:13
chm.but contains $Id$ but didn't have a svn:keywords property. Fixed. check-in: a3b965711e user: jacob tags: trunk
12:09
Typo. check-in: 80ed2bac99 user: jacob tags: trunk
2007-02-10
11:12
Since we're now able to cope with Default Settings describing a launchable session without getting confused by it, we can relax the restriction on storing a host name in DS, which has attracted a steady stream of complaints over the past six or seven years. check-in: 81d5f6836c user: simon tags: trunk
11:02
Avoid launching a session from the Default Settings, even if they do represent a launchable session, unless the user can be construed to have really meant it. This means: - starting up PuTTY when the Default Settings are launchable still brings up the config box, and you have to hit Open to actually launch that session - double-clicking on Default Settings from the config box will load them but not launch them. On the other hand: - explicitly loading the Default Settings on the command line using `-load' _does_ still launch them. check-in: e32793db99 user: simon tags: trunk
10:38
More svn:ignores. I'm constantly amazed that I keep not having put in all the useful ones yet! check-in: dee2e1d2b4 user: simon tags: trunk
2007-02-08
12:53
I've changed my mind about the PuTTY build script. It now delivers the release directory into a _subdirectory_ of the main build.out, and delivers the link maps and sign.sh alongside it. That simplifies both the nightly snapshot cron job (which now doesn't have to carefully move the maps out of the release directory or go looking in strange places for sign.sh) and my release procedure (for much the same reasons). check-in: 12ec555df0 user: simon tags: trunk
03:24
The big payoff from bob (from my POV at least): the PuTTY release procedure is now a huge amount less painful. check-in: 48ac997cd1 user: simon tags: trunk
2007-02-06
16:39
`installer.ico' doesn't fit into 8.3, so gets truncated to INSTALLE.ICO in the Windows source Zips. Rename to `puttyins.ico'. check-in: 0185769107 user: jacob tags: trunk
07:57
When emitting SSH_MSG_IGNORE to protect against known-IV attacks on CBC, remember to put an empty string in it rather than sending a completely empty packet. This should help with those servers (notably RomSShell) that actually check the contents of SSH_MSG_IGNORE. check-in: bcc614254b user: ben tags: trunk
2007-02-05
14:14
Ahem; other half of r7232... check-in: 6f2b9734d1 user: simon tags: trunk
14:04
When calling TIOCSCTTY, it helps to pass it an fd that's still open, instead of one we closed two lines earlier. I apparently broke this in r7107. check-in: 4b39592852 user: simon tags: trunk
12:07
Avoid passing modified SVN revision numbers (of the form 1234M) to parts of the versioning code which might not like them. As a result of this checkin, bob builds from modified SVN working copies will still announce themselves as revision nnnnM in the textual version strings, but their binary version in the Windows VERSIONINFO will now be 0.0.0.0. check-in: 0d6ba4a6e7 user: simon tags: trunk
09:01
Fiddle further with .htaccess: add some $s on the ends of the regexps to stop them matching the wrong files. check-in: bf61139205 user: simon tags: trunk
08:23
HTTP redirects for the variably-named signatures as well as their base files. (The signatures aren't actually _generated_ by bob, of course, but the redirects are harmless in their absence.) check-in: c4807a3220 user: simon tags: trunk
07:53
Script to generate signatures on the various PuTTY build outputs. Saves me having to remember all the fiddly gpg arguments every time. Should be usable for both releases (with manual passphrase input) and snapshots (run automatically). check-in: f4a0252883 user: simon tags: trunk
06:49
Fixes for snapshot building using bob. All of releases, snapshots and custom svn builds should now have appropriately named Unix source archives and installer binaries, plus .htaccess files providing redirects to them from totally standard filenames. I _think_ this now makes it feasible to switch the nightly builds to using bob. check-in: 4b5a9a3433 user: simon tags: trunk
02:02
Be slightly more forgiving about the nature of SVN_REV; bob will be reliable at defining it, and it's useful to be able to pass `1234M'- type revisions in for testing purposes. check-in: 02d1e62321 user: simon tags: trunk
02:02
Fix errors in $(Makeargs) which only occur when building development snapshots. check-in: c1d4b20b6e user: simon tags: trunk
2007-02-04
06:37
PuTTY builds should save the map files. check-in: 1f0939b35e user: simon tags: trunk
06:30
Version management updates for the new bob build script. There's now a fourth class of PuTTY version tags in addition to release, snapshot and unidentified: we now have `Custom build r1234', indicating a build made from that SVN revision in a context other than that of a dated snapshot. The build script generates these when it doesn't know what else to do; `unidentified builds' will now only occur when you run nmake from the command line. Also, the build script now generates sensible version data in the installer to match this. So I _think_ we should now be set to use bob to generate installer builds of the nightly snapshots, although of course I'll have to wait until tomorrow to test one. check-in: d9fefbf9f7 user: simon tags: trunk
06:12
Document \\.\COM10 faff on Windows. References: <http://msdn2.microsoft.com/en-us/library/aa363858.aspx> (CreateFile() docs) describes the use of \\.\ <http://msdn2.microsoft.com/en-us/library/aa365247.aspx> ("Naming a File") lists the reserved filenames (COM1-COM9, LPT1-LPT9, CON, PRN, AUX, NUL) check-in: af7f556843 user: jacob tags: trunk
05:17
Build script for PuTTY using bob. check-in: ff6b0c11d2 user: simon tags: trunk
2007-02-01
17:24
Swap order of `Columns' and `Rows' in the config dialog, to make it consistent with sizetip.c (and more nebulous conventions). check-in: 64d5560d28 user: jacob tags: trunk
2007-01-31
06:30
Colin Watson has fixed the disgusting icons on GTK1. His patch appears to merely fix the background colour (arranging for it to have transparency rather than being on some kind of default grey background), but it turns out to also fix the strange blurry behaviour I see in the GNOME Taskbar, for no very obvious reason. check-in: 11d422587d user: simon tags: trunk
2007-01-29
14:10
In the cases where Setup asks to restart the computer, explain exactly why this is deemed necessary. check-in: 91c9da859e user: jacob tags: trunk
2007-01-26
13:43
Switch round the order of CFLAGS and XFLAGS, so that the latter comes last on the compiler command line. This makes it easier to override the normal compile options (since conflicting command-line options usually follow a last-wins policy) in order to compile (for example) the Unix version -g -O0. check-in: 91bd9df8ab user: simon tags: trunk
08:11
If I'd tested under Minefield before releasing, r7168 would have been committed before the release. Therefore, stick it on the checklist for next time. check-in: 221d1e2668 user: simon tags: trunk
08:06
Kai Jourdan spotted a rather embarrassing double-free, and Minefield confirms that it's a real problem. check-in: be198c9138 user: simon tags: trunk
2007-01-24
18:14
We may as well update the website icon to match the other new ones. check-in: 203b64aae3 user: jacob tags: trunk
15:43
Post-release corrections to the checklist. check-in: c19f8fb422 user: simon tags: trunk
14:16
Version number bumps, and associated changes, for the 0.59 release. check-in: c8cb2b479e user: simon tags: trunk
14:00
Add .CHM to the ignore property. check-in: 2e1552cab6 user: simon tags: trunk
07:53
The direct link between the terminal and the back end via term_provide_resize_fn() was not being broken when the back end was destroyed on session termination, causing resizing an inactive PuTTY to be a segfault hazard. check-in: f75921a917 user: simon tags: trunk
05:20
faq-xpwontrun wants tweaking before the next release. check-in: 065773ed3e user: jacob tags: trunk
2007-01-23
08:12
Mention XXX-REVIEW-BEFORE-RELEASE in the same place as XXX-REMOVE-BEFORE-RELEASE. check-in: 016bfdfedc user: jacob tags: trunk
05:38
Mention the potential networked-CHM problem in the post-installer README. check-in: 84823feae7 user: simon tags: trunk
05:15
Checklist updates for the upcoming release, mostly to do with the retirement of the Alpha build. check-in: e159ee7b68 user: simon tags: trunk
2007-01-22
12:02
Add an icon for the PuTTY installer. Design concept (and noticing that Inno Setup had an option to specify an icon) by Jacob; detailed artwork and translation into Python by me. check-in: e5e89377a0 user: simon tags: trunk
08:04
Improve error reporting. check-in: 7e73cf761a user: simon tags: trunk
2007-01-21
17:34
Fix several bugs that stopped %proxyport from doing anything useful. check-in: 7ea0580824 user: jacob tags: trunk
17:34
Fix Plink, the serial backend, and local-proxy support on Win98SE (at least), which have been broken since r6797. (At least some versions of Win9x are gratuitously picky about the arguments to CreateThread(), requiring lpThreadId not to be NULL.) check-in: 803dd5a810 user: jacob tags: trunk
2007-01-20
14:05
Fix compiles on GCC 3.3, which doesn't know about assert(0); check-in: fe98cc1cc0 user: ben tags: trunk
10:14
Mention more versions of Windows. (Not Vista, yet.) check-in: 869a65387f user: jacob tags: trunk
08:13
Don't use C99 mid-block declarations and don't do arithmetic on void *. This helps with compilations on ancient Sun compilers. check-in: cb66fce8a1 user: ben tags: trunk
2007-01-19
08:33
Move README.txt into windows subdir. It's specific to the Windows installer, so it seems unnecessarily confusing to have it in the top level of the source distribution alongside README. check-in: 1e87ebdb85 user: jacob tags: trunk
2007-01-17
12:38
Flag user cancellation of authentication as a clean exit, so that it will close the window even in `close window only on clean exit' mode. Also, while I'm here, arrange a suitable exit code for "exit-signal". check-in: b95f1de6c0 user: simon tags: trunk
2007-01-16
15:32
Update WINVER to 0x500 to avoid build failures from Jacob's FlashWindow changes. Also fiddle with the <multimon.h> include, which was subtly broken in turn by that. check-in: 93485461a3 user: simon tags: trunk
14:54
At least, I have the technology to fix `beepind-win2k'. Tested on Win98, Win2K, and WinXP. check-in: d34719e103 user: jacob tags: trunk
13:26
Add more ifdefs to make uxser.c compile on OS X. check-in: 194a6ad085 user: simon tags: trunk
12:48
Fold up the `SSH' branch of the treeview by default; it's getting quite big and tends to hide the existence of the `Serial' config panel. This is implemented by folding up every branch of depth 2 or more, which with any luck might turn out to be general enough to carry over unchanged if other branches start expanding. Then again, we may have to fiddle with it again when that time comes; who knows? check-in: 0a82529a8f user: simon tags: trunk
2007-01-14
15:50
I've just realised that the data-logging options only work in PuTTY proper. Document this. check-in: 7eaf06be84 user: jacob tags: trunk
07:44
Remove the loops that close all open fds before running a subprocess. They were intended to make sure the child process didn't inherit anything embarrassing or inconvenient from us, such as the master end of its own pty, but now we instead do this by making sure to set all our own fds to not-FD_CLOEXEC on creation. This should fix Debian bug #357520. (This doesn't seem to work _quite_ right in uxproxy.c's invocation of a local proxy command: both ends of a GTK internal pipe end up in the child process's fd space. This appears to be another GTK 1 bug, inasmuch as it goes away when I build with Colin's preliminary GTK 2 patch; for the moment I think leaving that pipe lying around is probably less harmful than hampering the proxy process's ability to use extra fds by prior arrangement with PuTTY's parent process.) check-in: 5efc5c6876 user: simon tags: trunk
2007-01-12
17:35
Experimental fix for `psftp-hang'. (Experimental only in that I haven't thought about it very hard; it's a plausible fix for the observed cause of the extreme CPU usage, being that we were asking to be notified of Windows messages and then not dealing with them, plausibly leading to a loop. Works for me, anyway.) check-in: 03548c6c2e user: jacob tags: trunk
14:00
Remove redundant sentence. check-in: ed59f62f69 user: jacob tags: trunk
2007-01-09
18:54
Miscellaneous updates. check-in: 3f94e0a489 user: jacob tags: trunk
18:46
According to Frank Dijcks, this cast makes OpenWatcom happier. check-in: 75ed054d54 user: jacob tags: trunk
18:16
Various SSH-related things were appearing in the PuTTYtel configuration dialog, probably since the addition of the serial backend. Use a more robust check for SSH support. check-in: b777e07a90 user: jacob tags: trunk
17:47
MinGW needs an extra symbol _WIN32_IE defined to a particular value before it'll let you see an identifier (SHGFP_TYPE_CURRENT) referenced since r7082. (Actually, you need a pretty recent w32api before it's there at all.) Morally, this should be defined for all toolchains, not just MinGW/Cygwin, but I'll leave that to people who have those toolchains. <http://msdn2.microsoft.com/en-us/library/aa383745.aspx> Also add some other comments on our use of this API (since it's a horrible one that I suspect will come back and haunt us...) check-in: 01620f18e2 user: jacob tags: trunk
12:24
Get rid of all the MSVC warnings. check-in: 1ef7a9aa1d user: simon tags: trunk
12:14
Fix `puttygen-unix-perms': f_open(), PuTTY's wrapper on fopen, now takes a third argument which is TRUE if the file is being opened for writing and wants to be created in such a way that it's readable only to the owner. This is used when saving private keys. While I'm here, I also use this option when writing session logs, on the general principle that they probably contain _something_ sensitive. The new argument is only supported on Unix, for the moment. (I think writing owner-accessible-only files is the default on Windows.) check-in: 24342cc035 user: simon tags: trunk
12:05
Fix `win-randseed-location': use SHGetFolderPath() to find the Application Data directory in preference to the old-fashioned attempt to find the user's home directory, and use the _local- machine_ Application Data directory in preference even to that. SHGetFolderPath() is called via GetProcAddress, so this degrades gracefully on old Windowses. (Tested myself on Win95.) As part of this change, we now search for a location for the seed file separately for reading and writing, so that installing the new PuTTY should cause a seamless migration as the old seed file is read from the old location and then a new one written to the new location. `putty -cleanup' attempts to delete the seed file from _all_ affected locations. Naturally, a user-specified seed file path in the Registry still takes priority over all other means of finding the location. check-in: 3d5197d71a user: simon tags: trunk
2007-01-08
13:38
The remaining issue in `win-askappend-multi' appears to have been caused by the MessageBox() internal message loop eating WinSock FD_READ notifications, which then don't reappear afterwards because you have to explicitly prod a socket in order to get a repeat notification on it. Hence, here's a piece of infrastructure which seems to sort it out: a new winnet.c function called socket_reselect_all(), whose function is to go through all currently active sockets and re-run WSAAsyncSelect() on them, causing repeat notifications for anything we might have missed. I call this after every call to MessageBox(), and that seems to solve the problem. (The problem was actually masked in very recent revisions, probably by the reinstatement of pending_netevent in r7071. However, I don't believe that was a complete fix. This should be.) check-in: b73205c7e6 user: simon tags: trunk
12:54
Have one call to from_backend() per call to do_telnet_read(), instead of the previous rate of one per character. In `Flush log file frequently' mode, the latter was causing excessive slowdown due to fflush()ing once per byte. check-in: fb422327bb user: simon tags: trunk
2007-01-07
08:30
Fix ssh2-cisco-pw-pad by reverting r5122. However, I've kept the ability to easily re-enable the r5122 behaviour, in case we need to conditionally switch between the two at a later date. check-in: a5397b1479 user: simon tags: trunk
08:20
Greater leniency when importing private key files: accept both CRLF and LF, and don't object if the final line of the key lacks a newline. Also, while I'm here, switch to using fgetline() throughout so as not to have to do nasty buffer-size ad-hockery. check-in: 88c81664c7 user: simon tags: trunk
06:40
Reinstate RDB's pending_netevent mechanism, which was removed in r4906 in the process of adding the new timing code. It seems to have been what was previously preventing spew-lockup, and still seems to prevent it now I've put it back in. check-in: 5abeff92fa user: simon tags: trunk
04:17
Tweak the icon script, and the generated icons, to more closely match the original icons. (Apparently I managed to introduce errors while transcribing the originals for detailed analysis.) While I'm at it, add the obviously useful `make install' target in icons/Makefile, and fix the svn:ignore property on the icons directory. check-in: ca7615f72f user: simon tags: trunk