Ben Harris [Tue, 10 Apr 2007 21:46:44 +0000 (21:46 +0000)]
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.
Simon Tatham [Tue, 27 Mar 2007 19:10:10 +0000 (19:10 +0000)]
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.
Simon Tatham [Tue, 27 Mar 2007 18:49:59 +0000 (18:49 +0000)]
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.
Simon Tatham [Tue, 27 Mar 2007 18:16:36 +0000 (18:16 +0000)]
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.
Jacob Nevins [Sun, 25 Feb 2007 00:50:24 +0000 (00:50 +0000)]
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.
Jacob Nevins [Sun, 18 Feb 2007 19:56:16 +0000 (19:56 +0000)]
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.
Ben Harris [Sat, 17 Feb 2007 22:33:11 +0000 (22:33 +0000)]
Use preprocessor trickery to make the signal translation mechanism a little
less hideous. The output of the preprocessor should be basically unchanged.
Simon Tatham [Fri, 16 Feb 2007 18:44:07 +0000 (18:44 +0000)]
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.
Jacob Nevins [Tue, 13 Feb 2007 22:57:19 +0000 (22:57 +0000)]
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.
Simon Tatham [Sat, 10 Feb 2007 17:12:06 +0000 (17:12 +0000)]
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.
Simon Tatham [Sat, 10 Feb 2007 17:02:41 +0000 (17:02 +0000)]
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.
Simon Tatham [Thu, 8 Feb 2007 18:53:11 +0000 (18:53 +0000)]
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).
Ben Harris [Tue, 6 Feb 2007 13:57:27 +0000 (13:57 +0000)]
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.
Simon Tatham [Mon, 5 Feb 2007 18:07:11 +0000 (18:07 +0000)]
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.
Simon Tatham [Mon, 5 Feb 2007 14:23:34 +0000 (14:23 +0000)]
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.)
Simon Tatham [Mon, 5 Feb 2007 13:53:48 +0000 (13:53 +0000)]
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).
Simon Tatham [Mon, 5 Feb 2007 12:49:24 +0000 (12:49 +0000)]
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.
Simon Tatham [Mon, 5 Feb 2007 08:02:53 +0000 (08:02 +0000)]
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.
Simon Tatham [Sun, 4 Feb 2007 12:30:39 +0000 (12:30 +0000)]
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.
Jacob Nevins [Sun, 4 Feb 2007 12:12:52 +0000 (12:12 +0000)]
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)
Simon Tatham [Wed, 31 Jan 2007 12:30:48 +0000 (12:30 +0000)]
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.
Simon Tatham [Fri, 26 Jan 2007 19:43:15 +0000 (19:43 +0000)]
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.
Simon Tatham [Fri, 26 Jan 2007 14:11:56 +0000 (14:11 +0000)]
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.
Simon Tatham [Wed, 24 Jan 2007 13:53:28 +0000 (13:53 +0000)]
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.
Simon Tatham [Mon, 22 Jan 2007 18:02:06 +0000 (18:02 +0000)]
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.
Jacob Nevins [Sun, 21 Jan 2007 23:34:35 +0000 (23:34 +0000)]
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.)
Jacob Nevins [Fri, 19 Jan 2007 14:33:56 +0000 (14:33 +0000)]
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.
Simon Tatham [Wed, 17 Jan 2007 18:38:45 +0000 (18:38 +0000)]
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".
Simon Tatham [Tue, 16 Jan 2007 21:32:02 +0000 (21:32 +0000)]
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.
Simon Tatham [Tue, 16 Jan 2007 18:48:47 +0000 (18:48 +0000)]
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?
Simon Tatham [Sun, 14 Jan 2007 13:44:07 +0000 (13:44 +0000)]
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.)
Jacob Nevins [Fri, 12 Jan 2007 23:35:46 +0000 (23:35 +0000)]
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.)
Jacob Nevins [Wed, 10 Jan 2007 00:16:53 +0000 (00:16 +0000)]
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.
Jacob Nevins [Tue, 9 Jan 2007 23:47:15 +0000 (23:47 +0000)]
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...)
Simon Tatham [Tue, 9 Jan 2007 18:14:30 +0000 (18:14 +0000)]
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.)
Simon Tatham [Tue, 9 Jan 2007 18:05:17 +0000 (18:05 +0000)]
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.
Simon Tatham [Mon, 8 Jan 2007 19:38:39 +0000 (19:38 +0000)]
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.)
Simon Tatham [Mon, 8 Jan 2007 18:54:49 +0000 (18:54 +0000)]
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.
Simon Tatham [Sun, 7 Jan 2007 14:30:24 +0000 (14:30 +0000)]
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.
Simon Tatham [Sun, 7 Jan 2007 14:20:28 +0000 (14:20 +0000)]
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.
Simon Tatham [Sun, 7 Jan 2007 12:40:21 +0000 (12:40 +0000)]
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.
Simon Tatham [Sun, 7 Jan 2007 10:17:12 +0000 (10:17 +0000)]
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.
Simon Tatham [Sat, 6 Jan 2007 18:15:35 +0000 (18:15 +0000)]
Shiny new script which constructs the various icons for the PuTTY
suite. In a dramatic break with tradition, I'm actually checking in
the resulting icon files as well as the script that generates them,
because the script requires Python and ImageMagick and I don't think
it's reasonable to require that much extra infrastructure on
everyone checking out from Subversion.
The new icons should be _almost_ indistinguishable from the old
ones, at least at the 32x32 resolution. The immediately visible
change is that all the icons now come in 16x16, 32x32 and 48x48
formats, in both 16 colours and monochrome, instead of an ad-hoc
mixture of whichever ones I could be bothered to draw.
The same code can also be adapted to generate icons for the GTK port
(although icons for the running programs don't seem to be supported
by GTK 1 - another reason to upgrade to GTK 2!).
Simon Tatham [Fri, 5 Jan 2007 18:43:58 +0000 (18:43 +0000)]
Francois L'Archeveque spotted that the variable `winsock2_module'
only exists when compiling for IPv6, so we shouldn't try assigning
to it the rest of the time.