Ben Harris [Tue, 7 Aug 2007 22:02:03 +0000 (22:02 +0000)]
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.
Ben Harris [Mon, 6 Aug 2007 20:56:52 +0000 (20:56 +0000)]
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.
Ben Harris [Sun, 5 Aug 2007 14:18:43 +0000 (14:18 +0000)]
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.
Ben Harris [Sat, 4 Aug 2007 22:14:19 +0000 (22:14 +0000)]
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.
Ben Harris [Sat, 4 Aug 2007 16:04:08 +0000 (16:04 +0000)]
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.
Ben Harris [Sat, 4 Aug 2007 15:48:52 +0000 (15:48 +0000)]
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.
Ben Harris [Sat, 4 Aug 2007 14:32:06 +0000 (14:32 +0000)]
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).
Ben Harris [Sun, 29 Jul 2007 14:02:00 +0000 (14:02 +0000)]
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.
Ben Harris [Sat, 21 Jul 2007 21:39:36 +0000 (21:39 +0000)]
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.
Ben Harris [Sat, 21 Jul 2007 13:43:57 +0000 (13:43 +0000)]
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.
Ben Harris [Thu, 19 Jul 2007 23:53:02 +0000 (23:53 +0000)]
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.
Jacob Nevins [Sun, 1 Jul 2007 15:47:31 +0000 (15:47 +0000)]
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.
Jacob Nevins [Sun, 1 Jul 2007 15:41:09 +0000 (15:41 +0000)]
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.
Jacob Nevins [Sat, 30 Jun 2007 21:56:44 +0000 (21:56 +0000)]
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.)
Simon Tatham [Tue, 22 May 2007 18:37:17 +0000 (18:37 +0000)]
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.
Simon Tatham [Tue, 1 May 2007 12:26:44 +0000 (12:26 +0000)]
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 :-)
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.)