]> asedeno.scripts.mit.edu Git - PuTTY.git/log
PuTTY.git
19 years agoLoose end from r5031: the Kex panel should only be displayed in
Simon Tatham [Wed, 29 Dec 2004 12:32:25 +0000 (12:32 +0000)]
Loose end from r5031: the Kex panel should only be displayed in
mid-session if we are not using SSHv1. I've done this by introducing
a generic `cfg_info' function which every back end can use to
communicate an int's worth of data to setup_config_box; in SSH
that's the protocol version in use, and in everything else it's
currently zero.

[originally from svn r5040]
[r5031 == d77102a8d535a7000d6d909529a61a1564f6d678]

19 years agoThe latest unfix.org IPv6 patch contains these apparently
Simon Tatham [Tue, 28 Dec 2004 17:12:20 +0000 (17:12 +0000)]
The latest unfix.org IPv6 patch contains these apparently
IPv6-unrelated changes, which convert ints into unsigned in a few
key places in ssh.c. Looks harmless at worst, possibly terribly
useful, so I think we'll have these no matter what the real IPv6
stuff is up to!

[originally from svn r5038]

19 years agoAbility to save in mid-session! Simplest possible resolution to all
Simon Tatham [Tue, 28 Dec 2004 16:46:30 +0000 (16:46 +0000)]
Ability to save in mid-session! Simplest possible resolution to all
the difficult questions about when it's sensible to offer the option
of saving to the slot we loaded from: _we never do_. The user must
always explicitly specify a slot to save to.

[originally from svn r5035]
[this svn revision also touched putty-wishlist]

19 years agoForgot to initialise ssh->portfwds to NULL. Unusually, this was
Simon Tatham [Tue, 28 Dec 2004 16:18:17 +0000 (16:18 +0000)]
Forgot to initialise ssh->portfwds to NULL. Unusually, this was
pointed out by the MSVC debugger, not by valgrind :-)

[originally from svn r5034]

19 years agoCan't use `d' for an accelerator in the Kex panel, since it clashes
Simon Tatham [Tue, 28 Dec 2004 14:11:00 +0000 (14:11 +0000)]
Can't use `d' for an accelerator in the Kex panel, since it clashes
with the `d' used for the Down button in the Windows preference list.

[originally from svn r5032]

19 years agoSupport reconfiguration of key exchange in mid-session. The fiddly
Simon Tatham [Tue, 28 Dec 2004 14:10:32 +0000 (14:10 +0000)]
Support reconfiguration of key exchange in mid-session. The fiddly
bit is working out when to reschedule the next rekey for when the
timeout or data limit changes; sometimes it will be _right now_
because we're already over the new limit.

Still to do: the Kex panel should not appear in mid-session if we
are using SSHv1.

[originally from svn r5031]

19 years agoSSH port forwarding is now configurable in mid-session. After doing
Simon Tatham [Tue, 28 Dec 2004 14:07:05 +0000 (14:07 +0000)]
SSH port forwarding is now configurable in mid-session. After doing
Change Settings, the port forwarding setup function is run again,
and tags all existing port forwardings as `do not keep'. Then it
iterates through the config in the normal way; when it encounters a
port forwarding which is already in the tree, it tags it `keep'
rather than setting it up from scratch. Finally, it goes through the
tree and removes any that haven't been labelled `keep'. Hence,
editing the list of forwardings in Change Settings has the effect of
cancelling any forwardings you remove, and adding any new ones.

The SSH panel now appears in the reconfig box, and is empty apart
from a message explaining that it has to be there for subpanels of
it to exist. Better wording for this message would be welcome.

[originally from svn r5030]

19 years agoAbstracted out the rather large port-forwarding setup code into a
Simon Tatham [Tue, 28 Dec 2004 14:04:58 +0000 (14:04 +0000)]
Abstracted out the rather large port-forwarding setup code into a
routine which is common between SSH1 and SSH2. Since this routine is
not part of the coroutine system, this means it can't sit and wait
to get its various success/failure responses back. Hence, I've
introduced a system of queued packet handlers, each of which waits
for exactly one of a pair of messages (SSH1_SMSG_{SUCCESS,FAILURE}
or SSH2_MSG_REQUEST_{SUCCESS,FAILURE}), handles it when it arrives,
and automatically de-registers itself. Hence the port-forwarding
setup code can be called once, and then subsequent packets related
to it will automatically be handled as they arrive.

The real purpose of all this is that the infrastructure is now there
for me to arrange mid-session configurability of port forwarding.
However, a side benefit is that fewer round trips are involved in
session startup. I'd quite like to move more of the connection setup
(X forwarding, agent forwarding, pty allocation etc) to using the
new queued handler mechanism for this reason.

[originally from svn r5029]

19 years agoFix divide overflow in internal_mod(). Thanks to William Petiot for
Simon Tatham [Tue, 28 Dec 2004 14:04:26 +0000 (14:04 +0000)]
Fix divide overflow in internal_mod(). Thanks to William Petiot for
spotting a special case that the DIV instruction can't quite cover.

[originally from svn r5028]

19 years agoBasic configurability for client-initiated rekeys.
Jacob Nevins [Fri, 24 Dec 2004 13:39:32 +0000 (13:39 +0000)]
Basic configurability for client-initiated rekeys.

[originally from svn r5027]

19 years agoDon't offer repeat key exchange as a special command in SSH-1.
Jacob Nevins [Fri, 24 Dec 2004 10:04:28 +0000 (10:04 +0000)]
Don't offer repeat key exchange as a special command in SSH-1.

[originally from svn r5026]

19 years agoMinimally document "repeat key exchange" special command.
Jacob Nevins [Thu, 23 Dec 2004 05:54:09 +0000 (05:54 +0000)]
Minimally document "repeat key exchange" special command.

[originally from svn r5023]

19 years agoAdd a preference list for SSH-2 key exchange algorithms, on a new "Kex" panel
Jacob Nevins [Thu, 23 Dec 2004 02:24:07 +0000 (02:24 +0000)]
Add a preference list for SSH-2 key exchange algorithms, on a new "Kex" panel
(which will gain more content anon).

Retire BUG_SSH2_DH_GEX and add a backwards-compatibility wart, since we never
did find a way of automatically detecting this alleged server bug, and in any
case there was only ever one report (<3D91F3B5.7030309@inwind.it>, FWIW).

Also generalise askcipher() to a new askalg() (thus touching all the
front-ends).

I've made some attempt to document what SSH key exchange is and why you care,
but it could use some review for clarity (and outright lies).

[originally from svn r5022]

19 years agoFix potential access of freed data (only if we couldn't create the
Jacob Nevins [Wed, 22 Dec 2004 23:17:02 +0000 (23:17 +0000)]
Fix potential access of freed data (only if we couldn't create the
second of two registry keys, so pretty unlikely).

[originally from svn r5021]

19 years agoSupport diffie-hellman-group14-sha1 group exchange. Tested against
Simon Tatham [Wed, 22 Dec 2004 10:53:58 +0000 (10:53 +0000)]
Support diffie-hellman-group14-sha1 group exchange. Tested against
locally built OpenSSH 3.9, and seems to work fine.

[originally from svn r5018]

19 years agoIn my revamp of cursor handling I had assumed that you were supposed
Simon Tatham [Wed, 22 Dec 2004 10:21:50 +0000 (10:21 +0000)]
In my revamp of cursor handling I had assumed that you were supposed
to call _either_ do_text() _or_ do_cursor() on a given character
cell. In fact you're supposed to call do_text() no matter what, and
then call do_cursor() as well if it's got the cursor on it, since
do_cursor() _only_ draws the actual cursor, which often doesn't also
cause the text to get drawn.

I'm half tempted to change this in the interface, retire do_cursor()
as an external function and relegate it to an internal function in
each front end, and require that do_text() must fully process all
cursor attributes it is passed. However, I haven't done this yet.

[originally from svn r5017]

19 years agoThe end condition in the binary search loop in the new getType() was
Simon Tatham [Mon, 20 Dec 2004 09:27:44 +0000 (09:27 +0000)]
The end condition in the binary search loop in the new getType() was
incorrect. I must have written that binary search idiom a hundred
times, so it's rather embarrassing that I can't _automatically_ get
it right! This was causing all kinds of characters to be classified
as ON when they should have been various other classes.

Also while I'm here, I've added another test case to utf8.txt (a
small piece of Arabic within a predominantly L->R line), and also
supplied a means to compile minibidi.c with -DTEST_GETTYPE to
produce a command-line character class lookup tool. (Not sure what
use that'll be _other_ than debugging this precise problem, but I
don't like to throw it away now I've written it :-)

[originally from svn r5016]

19 years agoRestore border around terminal to default background colour rather than
Jacob Nevins [Sun, 19 Dec 2004 23:37:30 +0000 (23:37 +0000)]
Restore border around terminal to default background colour rather than
something outside colours[] (consistently brown on my system).

(I don't understand why this code was the way it was, but it gave the
correct result before r4917 `256-colours', and now doesn't.)

[originally from svn r5014]
[r4917 == e4e10e494b3ee80e68c84882628d84c2791b1344]

19 years agoCorrect number of configurable colours (NCFGCOLOURS) to match reality
Jacob Nevins [Sun, 19 Dec 2004 23:15:17 +0000 (23:15 +0000)]
Correct number of configurable colours (NCFGCOLOURS) to match reality
(leftover from `256-colours', r4917).

[originally from svn r5013]
[r4917 == e4e10e494b3ee80e68c84882628d84c2791b1344]

19 years agoFix line cursor colours (fallout from `256-colours'), on both Windows and Unix.
Jacob Nevins [Sun, 19 Dec 2004 22:37:05 +0000 (22:37 +0000)]
Fix line cursor colours (fallout from `256-colours'), on both Windows and Unix.

[originally from svn r5012]

19 years agoMake sure the docs in a Unix release tarball are generated with the correct
Jacob Nevins [Sat, 18 Dec 2004 11:34:41 +0000 (11:34 +0000)]
Make sure the docs in a Unix release tarball are generated with the correct
version info.

[originally from svn r5011]

19 years agoMissed options off mput help
Jacob Nevins [Sat, 18 Dec 2004 10:46:21 +0000 (10:46 +0000)]
Missed options off mput help

[originally from svn r5010]

19 years agozip apparently gives a warning (`-l used on binary file') when you
Simon Tatham [Sat, 18 Dec 2004 10:00:27 +0000 (10:00 +0000)]
zip apparently gives a warning (`-l used on binary file') when you
use -l on a UTF-8 text file. Move potentially UTF-8 things (the new
testdata files) into a new category of source files, and suppress
zip's warning for that category.

[originally from svn r5009]

19 years agoJacob has pointed out why SIGCHLD was blocked, so I've updated the
Simon Tatham [Fri, 17 Dec 2004 14:25:53 +0000 (14:25 +0000)]
Jacob has pointed out why SIGCHLD was blocked, so I've updated the
comment when I unblock it in pty.c to reflect reality. Also I've
moved block_signal() out of pterm.c into signal.c, so I can
conveniently use it for unblocking SIGCHLD rather than having to
reinvent it in pty.c.

[originally from svn r5006]

19 years agoThe xfer mechanism wasn't gracefully terminating when an error was
Simon Tatham [Fri, 17 Dec 2004 13:39:41 +0000 (13:39 +0000)]
The xfer mechanism wasn't gracefully terminating when an error was
encountered part way through transfer. In particular, this caused
psftp to hang (waiting for FXP_READ replies which had already
arrived) if you try `get' (without -r) on a remote directory.

[originally from svn r5005]

19 years agoDocument recent SFTP changes:
Jacob Nevins [Fri, 17 Dec 2004 13:00:01 +0000 (13:00 +0000)]
Document recent SFTP changes:
 - document behaviour of "-r" with mget/mput/reget/reput
 - document "close" command
 - document SFTP wildcard syntax for those who may not be familiar with Unix
   wildcards

[originally from svn r5004]

19 years agoI _think_ I've just fixed `font-overflow'. term->disptext now tracks
Simon Tatham [Fri, 17 Dec 2004 12:55:12 +0000 (12:55 +0000)]
I _think_ I've just fixed `font-overflow'. term->disptext now tracks
the start of every contiguous run passed to do_text() or
do_cursor(), and arranges never to overwrite only part of such a run
on the next update.

I'm a bit worried about this checkin because I've also completely
revamped cursor handling: the cursor was previously being drawn
_outside_ the main loop over the display line, and is now drawn as
part of that loop when it gets to the cursor location. It _seems_ to
still work sensibly, even in complex cases involving LATTR_WIDE and
double-width CJK characters etc, but I won't be entirely happy until
it's had some beta use.

[originally from svn r5003]
[this svn revision also touched putty-wishlist]

19 years agoUpdate online help for "-r" and "--" options to get/put commands.
Jacob Nevins [Fri, 17 Dec 2004 12:15:17 +0000 (12:15 +0000)]
Update online help for "-r" and "--" options to get/put commands.
Use command name in error messages rather than hardcoded "get:"/"put:".

[originally from svn r5002]

19 years agoDivide the do_paint() loop into several subloops. The activity of
Simon Tatham [Fri, 17 Dec 2004 11:37:16 +0000 (11:37 +0000)]
Divide the do_paint() loop into several subloops. The activity of
going through the line and working out which bits need to be redrawn
is now in a separate loop from the subsequent activity of actually
going through and doing the redraws. This _should_ enable me to
tinker with the which-bits-to-redraw data in between the two, thus
fixing `font-overflow'. However, I thought it would be sensible to
break the work up into two commits so we can track bugs in the
restructuring separately from bugs introduced by the new feature.

Also added a couple more terminal test files.

[originally from svn r5001]

19 years agoI had apparently broken wrapping of double-width characters (again).
Simon Tatham [Fri, 17 Dec 2004 11:24:25 +0000 (11:24 +0000)]
I had apparently broken wrapping of double-width characters (again).
Also fixed the new UTF-8 test file so that it tests double-width
wrapping both with _and_ without LATTR_WRAPPED2.

[originally from svn r5000]

19 years agoI'd rather not keep losing these little test files, so here's some
Simon Tatham [Fri, 17 Dec 2004 11:18:13 +0000 (11:18 +0000)]
I'd rather not keep losing these little test files, so here's some
stuff that I can `cat' into a terminal to test particular features
of it.

[originally from svn r4999]

19 years agoApparently SIGCHLD is blocked by default in processes run in a
Simon Tatham [Fri, 17 Dec 2004 09:43:09 +0000 (09:43 +0000)]
Apparently SIGCHLD is blocked by default in processes run in a
pterm, which was breaking my bash job notification patch. This is
apparently not the case for xterm, so I've fiddled with it. Not
entirely sure _why_ it did this in the first place, but there we go.

[originally from svn r4997]

19 years agoGeneral mechanism for ensuring a dodgy SFTP server can't return
Simon Tatham [Thu, 16 Dec 2004 19:36:47 +0000 (19:36 +0000)]
General mechanism for ensuring a dodgy SFTP server can't return
malicious filenames via FXP_READDIR.

[originally from svn r4995]

19 years agoImplement the `close' command, which terminates an SFTP session but
Simon Tatham [Thu, 16 Dec 2004 19:19:59 +0000 (19:19 +0000)]
Implement the `close' command, which terminates an SFTP session but
does not quit PSFTP, so you can then issue another `open' to connect
to somewhere else. This has apparently been trivial for some time,
for exactly the same reasons that `reuse-windows' was so easy, but
it hadn't occurred to me to actually do it until now.

[originally from svn r4994]

19 years agoJacob points out that I introduced a bug in PSFTP when I did the
Simon Tatham [Thu, 16 Dec 2004 19:15:38 +0000 (19:15 +0000)]
Jacob points out that I introduced a bug in PSFTP when I did the
timing shakeup: just running `psftp' caused the net/stdin select
loop (on both Unix and Windows) to get confused at the lack of any
network connection and give up immediately. Should now be fixed.

[originally from svn r4993]

19 years agoWildcards in `ls'. I think that completes `psftp-multi'. Woo!
Simon Tatham [Thu, 16 Dec 2004 17:45:29 +0000 (17:45 +0000)]
Wildcards in `ls'. I think that completes `psftp-multi'. Woo!

[originally from svn r4992]
[this svn revision also touched putty-wishlist]

19 years agoImplement mget and mput in PSFTP, supporting wildcards.
Simon Tatham [Thu, 16 Dec 2004 17:35:20 +0000 (17:35 +0000)]
Implement mget and mput in PSFTP, supporting wildcards.

[originally from svn r4991]
[this svn revision also touched putty-wishlist]

19 years agoSupport for recursive file transfer in PSFTP.
Simon Tatham [Thu, 16 Dec 2004 16:37:37 +0000 (16:37 +0000)]
Support for recursive file transfer in PSFTP.

[originally from svn r4990]
[this svn revision also touched putty-wishlist]

19 years agoFix obviously stupid segfault. Ahem.
Simon Tatham [Thu, 16 Dec 2004 15:38:39 +0000 (15:38 +0000)]
Fix obviously stupid segfault. Ahem.

[originally from svn r4989]

19 years agoAbe Crabtree complains that flushing the log file as often as we do in 0.56
Jacob Nevins [Thu, 16 Dec 2004 15:22:36 +0000 (15:22 +0000)]
Abe Crabtree complains that flushing the log file as often as we do in 0.56
results in unacceptable performance for him on Win2000. Add a checkbox to
revert to the old behaviour.

[originally from svn r4988]
[this svn revision also touched putty-wishlist]

19 years agoRename scp.* to pscp.*, because I always misspell it that way. Also
Simon Tatham [Thu, 16 Dec 2004 15:01:43 +0000 (15:01 +0000)]
Rename scp.* to pscp.*, because I always misspell it that way. Also
it's more consistent with PSFTP like this: scp.c/pscp.c is more
similar to psftp.c (the main application framework) than it is to
sftp.c (a set of back-end library routines).

[originally from svn r4987]

19 years agoUnix PSCP was tight-looping when connecting through a ProxyCommand.
Simon Tatham [Fri, 10 Dec 2004 11:41:14 +0000 (11:41 +0000)]
Unix PSCP was tight-looping when connecting through a ProxyCommand.
Turned out that sk_localproxy_close() was closing the pipe fds
without removing them from the uxsel list.

[originally from svn r4965]

19 years agoReplace the RLE-based getType() function with one that binary-
Simon Tatham [Wed, 8 Dec 2004 19:41:14 +0000 (19:41 +0000)]
Replace the RLE-based getType() function with one that binary-
searches a list of (start,end,type) tuples. This increases data size
by about 5Kb, which is a shame; but on the plus side, it boosts
performance from O(N) to O(log N). As an added bonus, the table now
covers _all_ of Unicode, not just the BMP.

[originally from svn r4964]

19 years agoFurther clarity and speed cleanups of minibidi:
Simon Tatham [Wed, 8 Dec 2004 19:07:05 +0000 (19:07 +0000)]
Further clarity and speed cleanups of minibidi:
 - rewrote the reversal loop in flipThisRun to be considerably clearer
 - rewrote leastGreaterOdd and leastGreaterEven as bit-twiddling macros
 - replaced malloc/free with snewn/sfree
 - lost some gratuitous repeat calls of getType on the same character
And most noticeably:
 - got rid of minibidi.h, since it was entirely full of minibidi.c
   internals (including constant data definitions!) and wasn't used
   to provide an external interface at all. Everything in it has
   been folded into minibidi.c.

[originally from svn r4963]

19 years agoReformat minibidi.[ch] in line with my coding conventions. It was
Simon Tatham [Tue, 7 Dec 2004 18:18:28 +0000 (18:18 +0000)]
Reformat minibidi.[ch] in line with my coding conventions. It was
just getting to be too much hassle trying to work with the existing
indentation.

[originally from svn r4952]

19 years agoBidi stability work. I _think_ I've now removed all the failures of
Simon Tatham [Tue, 7 Dec 2004 18:10:09 +0000 (18:10 +0000)]
Bidi stability work. I _think_ I've now removed all the failures of
array bounds checking.

[originally from svn r4951]

19 years agoFix segfault when HOME not set on Unix.
Owen Dunn [Tue, 7 Dec 2004 11:50:44 +0000 (11:50 +0000)]
Fix segfault when HOME not set on Unix.

[originally from svn r4948]

19 years ago\n and \r need double backslashes in Halibut.
Simon Tatham [Thu, 2 Dec 2004 13:48:32 +0000 (13:48 +0000)]
\n and \r need double backslashes in Halibut.

[originally from svn r4947]

19 years agoNULL a couple of members after freeing them in ssh_free(). In particular,
Jacob Nevins [Thu, 2 Dec 2004 13:37:28 +0000 (13:37 +0000)]
NULL a couple of members after freeing them in ssh_free(). In particular,
should stop ssh_do_close() accessing freed ssh->channels when invoked later
from ssh_free(). Spotted by Fred Sauer.

(Perhaps this is the cause of the crashes people have been reporting on
abnormal closures such as `Software caused connection abort'? I've not been
able to test this.)

[originally from svn r4946]

19 years agoMention our assumptions about the execution character set. Not very
Ben Harris [Thu, 2 Dec 2004 13:07:32 +0000 (13:07 +0000)]
Mention our assumptions about the execution character set.  Not very
well-written, since my brain is largely absent today.

[originally from svn r4945]

19 years agoBah. Ben points out that SSH_1_ version strings should still end in
Simon Tatham [Wed, 1 Dec 2004 15:34:12 +0000 (15:34 +0000)]
Bah. Ben points out that SSH_1_ version strings should still end in
\n, and also that `\r' and `\n' don't mean what I think they mean on
all compilers (Mac reverses them).

[originally from svn r4941]

19 years agoAnd now I look at it, the latest draft also says version strings
Simon Tatham [Wed, 1 Dec 2004 13:42:50 +0000 (13:42 +0000)]
And now I look at it, the latest draft also says version strings
should be followed by \r\n, not just \n.

[originally from svn r4940]

19 years agoKimmo Parviainen points out that SSH software version strings have
Simon Tatham [Wed, 1 Dec 2004 13:37:31 +0000 (13:37 +0000)]
Kimmo Parviainen points out that SSH software version strings have
restrictions on the use of hyphens and spaces.

[originally from svn r4939]

19 years agoterm_bidi_cache_store() now has a need to distinguish between the
Simon Tatham [Wed, 1 Dec 2004 09:25:20 +0000 (09:25 +0000)]
term_bidi_cache_store() now has a need to distinguish between the
_width_ of a terminal line (number of character cell positions) and
its _size_ (number of termchars), since of course these differ in
the presence of combining characters.

[originally from svn r4938]

19 years agoFix large memory leak introduced in the r4915 bidi changes.
Simon Tatham [Tue, 30 Nov 2004 13:39:58 +0000 (13:39 +0000)]
Fix large memory leak introduced in the r4915 bidi changes.

[originally from svn r4936]
[r4915 == 569da2eb7bb5ac863946ba5c3775284a72ddeb94]

19 years agoAnother default-background fix for 256-colour mode
Jacob Nevins [Tue, 30 Nov 2004 01:07:29 +0000 (01:07 +0000)]
Another default-background fix for 256-colour mode

[originally from svn r4931]

19 years agoNitpick, close bracket.
Owen Dunn [Mon, 29 Nov 2004 16:58:02 +0000 (16:58 +0000)]
Nitpick, close bracket.

[originally from svn r4926]

19 years agoSome blurb about terminal types and 256-colour xterms. Thanks to Dan
Simon Tatham [Mon, 29 Nov 2004 11:31:21 +0000 (11:31 +0000)]
Some blurb about terminal types and 256-colour xterms. Thanks to Dan
Nicolaescu for the suggestion.

[originally from svn r4925]

19 years agorm '$Source$' from comments as not meaningful under Subversion
Jacob Nevins [Mon, 29 Nov 2004 09:40:59 +0000 (09:40 +0000)]
rm '$Source$' from comments as not meaningful under Subversion

[originally from svn r4924]

19 years agotypo in comment
Jacob Nevins [Mon, 29 Nov 2004 09:27:13 +0000 (09:27 +0000)]
typo in comment

[originally from svn r4923]

19 years agoBriefly document the "CP866" manual-entry feature on Windows in the dialog
Jacob Nevins [Mon, 29 Nov 2004 09:23:11 +0000 (09:23 +0000)]
Briefly document the "CP866" manual-entry feature on Windows in the dialog
itself (since we have a bit of room).

[originally from svn r4922]

19 years agoBah, there's always one thing I miss. Correct the background-colour
Simon Tatham [Sun, 28 Nov 2004 15:18:23 +0000 (15:18 +0000)]
Bah, there's always one thing I miss. Correct the background-colour
handling in Unix PuTTY.

[originally from svn r4918]

19 years agoImplement xterm 256-colour mode.
Simon Tatham [Sun, 28 Nov 2004 15:13:34 +0000 (15:13 +0000)]
Implement xterm 256-colour mode.

[originally from svn r4917]
[this svn revision also touched putty-wishlist]

19 years agoStability fixes (thanks valgrind).
Simon Tatham [Sun, 28 Nov 2004 09:32:17 +0000 (09:32 +0000)]
Stability fixes (thanks valgrind).

[originally from svn r4916]

19 years agoCursor position, selection highlights and mouse clicks are now all
Simon Tatham [Sun, 28 Nov 2004 09:24:57 +0000 (09:24 +0000)]
Cursor position, selection highlights and mouse clicks are now all
transformed back and forth according to the character position
permutation output from the bidi algorithm. I was expecting that to
be a lot harder.

[originally from svn r4915]

19 years agoOops; forgot to add this file in r4913.
Simon Tatham [Sun, 28 Nov 2004 00:48:31 +0000 (00:48 +0000)]
Oops; forgot to add this file in r4913.

[originally from svn r4914]
[r4913 == 8c69ba067266beedd7740132f8ae558cc6ebc641]

19 years agoLoose end from timing shakeup: sshrand.c is now a client of
Simon Tatham [Sat, 27 Nov 2004 19:56:38 +0000 (19:56 +0000)]
Loose end from timing shakeup: sshrand.c is now a client of
timing.c, and hence takes its own responsibility for calling
noise_regular() at regular intervals. Again, this means it will be
called consistently in _all_ the SSH-speaking tools, not just those
in which I remembered to call it!

[originally from svn r4913]

19 years agoChanges in startup order to ensure any subsystem which might attempt
Simon Tatham [Sat, 27 Nov 2004 19:41:24 +0000 (19:41 +0000)]
Changes in startup order to ensure any subsystem which might attempt
to schedule timers is not started until after hwnd is initialised.

[originally from svn r4912]

19 years agoSlight improvement to cursor blink timing: since the cursor doesn't
Simon Tatham [Sat, 27 Nov 2004 19:34:45 +0000 (19:34 +0000)]
Slight improvement to cursor blink timing: since the cursor doesn't
blink when the window doesn't have focus, we don't schedule blink
timers at that point either.

Infrastructure change: term->has_focus should now not be written
directly from outside terminal.c. Instead, use the function
term_set_focus, which will sort out the blink timers as well.

[originally from svn r4911]

19 years agoAlmost _all_ of the final connection-layer loop, in both SSH1 and
Simon Tatham [Sat, 27 Nov 2004 15:32:45 +0000 (15:32 +0000)]
Almost _all_ of the final connection-layer loop, in both SSH1 and
SSH2, is now handled by the packet dispatch table. Dispatch table
entries are enabled as soon as possible, so that if anyone tries to
(for example) start using a forwarded port before the main shell
session setup has finished, things should work sensibly.

The SSH code is now a hybrid of coroutine-based sequential logic and
table-driven event dispatch, each where it makes the most sense. I'm
rather pleased with it.

Should fix: ext-data-at-start, portfwd-at-start.

[originally from svn r4909]
[this svn revision also touched putty-wishlist]

19 years agoImplement client-initiated rekeys after an hour, or after 1Gb of
Simon Tatham [Sat, 27 Nov 2004 14:29:20 +0000 (14:29 +0000)]
Implement client-initiated rekeys after an hour, or after 1Gb of
data transfer in either direction (whichever comes first), or at
explicit client request (nice idea Jacob). Have tested by lowering
the limits, and it all seems solid enough; in particular, this has
also allowed me to test the behaviour when connection-level data is
received during rekey, and that looks fine too (at least it does
_now_ :-).

[originally from svn r4908]
[this svn revision also touched putty-wishlist]

19 years agoBah, I knew I'd miss _something_. term_out is now static, so
Simon Tatham [Sat, 27 Nov 2004 13:31:07 +0000 (13:31 +0000)]
Bah, I knew I'd miss _something_. term_out is now static, so
declaring it in putty.h gives a warning under Unix.

[originally from svn r4907]

19 years agoNew timing infrastructure. There's a new function schedule_timer()
Simon Tatham [Sat, 27 Nov 2004 13:20:21 +0000 (13:20 +0000)]
New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the
future. So terminal.c can do its own handling of blinking, visual
bells and deferred screen updates, without having to rely on
term_update() being called 50 times a second (fixes: pterm-timer);
and ssh.c and telnet.c both invoke a new module pinger.c which takes
care of sending keepalives, so they get sent uniformly in all front
ends (fixes: plink-keepalives, unix-keepalives).

[originally from svn r4906]
[this svn revision also touched putty-wishlist]

19 years agouint64_decimal() incorrectly output 0 as "" instead of "0". This only affected
Jacob Nevins [Thu, 25 Nov 2004 13:40:01 +0000 (13:40 +0000)]
uint64_decimal() incorrectly output 0 as "" instead of "0". This only affected
PSFTP's "reput" chat. Spotted by Greg Parker.

[originally from svn r4904]

19 years agoRe-architected the top level of the SSH protocol handlers.
Simon Tatham [Wed, 24 Nov 2004 20:35:15 +0000 (20:35 +0000)]
Re-architected the top level of the SSH protocol handlers.
ssh1_protocol() and ssh2_protocol() are now high-level functions
which see _every_ SSH packet and decide which lower-level function
to pass it to. Also, they each support a dispatch table of simple
handler functions for message types which can arrive at any time.
Results are:

 - ignore, debug and disconnect messages are now handled by the
   dispatch table rather than being warts in the rdpkt functions

 - SSH2_MSG_WINDOW_ADJUST is handled by the dispatch table, which
   means that do_ssh2_authconn doesn't have to explicitly
   special-case it absolutely every time it waits for a response to
   its latest channel request

 - the top-level SSH2 protocol function chooses whether messages get
   funnelled to the transport layer or the auth/conn layer based on
   the message number ranges defined in the SSH architecture draft -
   so things that should go to auth/conn go there even in the middle
   of a rekey (although a special case is that nothing goes to
   auth/conn until initial kex has finished). This should fix the
   other half of ssh2-kex-data.

[originally from svn r4901]

19 years agorandom_init() should be called at most once during the running of
Simon Tatham [Wed, 24 Nov 2004 19:53:31 +0000 (19:53 +0000)]
random_init() should be called at most once during the running of
PuTTY, even if it's managing multiple sessions.

[originally from svn r4900]

19 years agoNow that Packet structures are dynamically allocated, it means we
Simon Tatham [Wed, 24 Nov 2004 19:23:02 +0000 (19:23 +0000)]
Now that Packet structures are dynamically allocated, it means we
can keep several of them in parallel. In particular, this allows us
to queue outgoing packets during repeat key exchange, to be actually
sent after the rekey completes.

(This doesn't fully fix ssh2-kex-data; also required is the ability
to handle _incoming_ connection-layer packets during rekey without
exploding.)

[originally from svn r4899]

19 years agoMinor refactoring: the fields `pktin' and `pktout' in the Ssh
Simon Tatham [Wed, 24 Nov 2004 18:45:52 +0000 (18:45 +0000)]
Minor refactoring: the fields `pktin' and `pktout' in the Ssh
structure have been retired. Now all Packet structures are
dynamically allocated. Each rdpkt function allocates one, and it's
freed after being used; and the packet construction functions
allocate them too, and they're freed by the send functions.

`pktin' and `pktout' were ugly. They were _morally_ still global
variables; even though they were replicated per SSH session to
comply with the Mac no-globals requirement, they weren't really in
the _spirit_ of `dynamically allocate your data'.

As a side effect of this change, the `pktout_blanks' and
`pktout_nblanks' fields in the Ssh structure have been moved into
the Packet structure.

[originally from svn r4898]

19 years agoI think rjk meant `setpgid', not `setpgrp'.
Simon Tatham [Wed, 24 Nov 2004 11:42:45 +0000 (11:42 +0000)]
I think rjk meant `setpgid', not `setpgrp'.

[originally from svn r4897]

19 years agoRJK's OS X portability patch:
Simon Tatham [Wed, 24 Nov 2004 11:36:08 +0000 (11:36 +0000)]
RJK's OS X portability patch:
 - initialise blank mbstate_t using memset rather than an ad-hoc
   initialiser.
 - expand the OMIT_UTMP ifdefs to enclose a load of entire functions
   that would generate `static function never called' warnings if
   left as empty shells.
 - couple of other fiddly things.

[originally from svn r4896]

19 years agoIt's probably about time I took my private path to the Halibut
Simon Tatham [Wed, 24 Nov 2004 11:35:27 +0000 (11:35 +0000)]
It's probably about time I took my private path to the Halibut
binary out of the PuTTY docs Makefile. Instead, I expect to find
Halibut as simply `halibut' on the PATH, and anyone who doesn't have
it there can always do `make HALIBUT=/path/to/halibut'.

[originally from svn r4895]

19 years ago\k --> \K
Jacob Nevins [Wed, 24 Nov 2004 03:18:14 +0000 (03:18 +0000)]
\k --> \K

[originally from svn r4893]

19 years agoDarek Olszewski points out that telnet->ldisc is never initialised
Simon Tatham [Tue, 23 Nov 2004 16:43:04 +0000 (16:43 +0000)]
Darek Olszewski points out that telnet->ldisc is never initialised
to NULL.

[originally from svn r4888]

19 years agoFix typo in term_size(), flagged by a Dr Watson log from Temme Rainer.
Simon Tatham [Mon, 22 Nov 2004 13:49:12 +0000 (13:49 +0000)]
Fix typo in term_size(), flagged by a Dr Watson log from Temme Rainer.

[originally from svn r4881]

19 years agoMinor index tweakery.
Simon Tatham [Mon, 22 Nov 2004 12:42:33 +0000 (12:42 +0000)]
Minor index tweakery.

[originally from svn r4880]

19 years agoTrivial bug fix pointed out by Paul Fox: potentially missing fclose().
Simon Tatham [Mon, 22 Nov 2004 11:02:44 +0000 (11:02 +0000)]
Trivial bug fix pointed out by Paul Fox: potentially missing fclose().

[originally from svn r4877]

19 years agoAdd missing backslash in "Unable to create registry key" messages.
Jacob Nevins [Sat, 20 Nov 2004 19:07:34 +0000 (19:07 +0000)]
Add missing backslash in "Unable to create registry key" messages.

[originally from svn r4855]

19 years agoUI tweak from Malcolm Rowe: set IDM_VIEWKEYS as the default menu item and use
Jacob Nevins [Sat, 20 Nov 2004 18:29:58 +0000 (18:29 +0000)]
UI tweak from Malcolm Rowe: set IDM_VIEWKEYS as the default menu item and use
that mechanism to invoke it on double-click; this emboldens it in the right-
click menu.

[originally from svn r4851]

19 years agoXXX comment in the logic which sends failed password auth back to username
Jacob Nevins [Sat, 20 Nov 2004 17:47:40 +0000 (17:47 +0000)]
XXX comment in the logic which sends failed password auth back to username
prompt for keyboard-interactive. I suspect we should do the same with that
method (especially given the apparent number of systems that use it for
regular password auth), but in the absence of systems to test against I've
not actually made the change. (I'm worried that the `partial success' field
might not be set correctly in a multi-stage authentication, for instance.)

[originally from svn r4850]

19 years agoAs a result of the policy allowing changes of username to reset the
Jacob Nevins [Sat, 20 Nov 2004 17:11:38 +0000 (17:11 +0000)]
As a result of the policy allowing changes of username to reset the
authentication state, a failed `password' authentication in SSH-2 was
sending us back to trying `none' and `keyboard-interactive' each time
round, which uses up OpenSSH's quota of authentication attempts rather
quickly. Added a check for `cfg.change_username' to the logic which
sends us back to the start.

[originally from svn r4849]

19 years agoMake PSFTP use console_get_line() to fetch username, so that that prompt is
Jacob Nevins [Fri, 19 Nov 2004 21:24:47 +0000 (21:24 +0000)]
Make PSFTP use console_get_line() to fetch username, so that that prompt is
affected by `-batch'.

[originally from svn r4833]

19 years agoconsole_get_line() returns failure iff console_batch_mode is set, whereas
Jacob Nevins [Fri, 19 Nov 2004 21:05:31 +0000 (21:05 +0000)]
console_get_line() returns failure iff console_batch_mode is set, whereas
before is would return success and the empty string. IMO this makes `-batch'
much more useful; before, utilities such as Plink in `-batch' mode would
attempt to plough on using empty strings for usernames, passwords, and so on.

[originally from svn r4832]

19 years agoRemove FLAG_INTERACTIVE test from "login as:" prompt. Kelly John Carney
Jacob Nevins [Fri, 19 Nov 2004 20:57:32 +0000 (20:57 +0000)]
Remove FLAG_INTERACTIVE test from "login as:" prompt. Kelly John Carney
pointed out that Plink would attempt to use a zero-length username iff
a remote command was specified (because the FLAG_INTERACTIVE test was
erroneously combined with the no-username test).

I don't think this will break non-interactive use; in the cases which
behave differently, Plink would be attempting to use the empty
username, which was almost certainly wrong, whereas now it will give a
prompt (which can be avoided with -batch as usual).

(Although perhaps we should attempt to use a local username as a guess for
the remote username, as PSCP does? I've not done this.)

[originally from svn r4831]

19 years ago"Connection reset by peer" is apparently not the only error that keepalives can
Jacob Nevins [Thu, 18 Nov 2004 19:44:26 +0000 (19:44 +0000)]
"Connection reset by peer" is apparently not the only error that keepalives can
help with.

[originally from svn r4819]

19 years ago"Software caused connection abort": a couple of people now have got rid of
Jacob Nevins [Thu, 18 Nov 2004 19:41:41 +0000 (19:41 +0000)]
"Software caused connection abort": a couple of people now have got rid of
this with keepalives. Also try to emphasise that this seems to be a generic
catch-all type of error.

[originally from svn r4818]

19 years ago*sigh* X11 forwarding to a local display (":0" or similar) specified in the
Jacob Nevins [Thu, 18 Nov 2004 17:13:45 +0000 (17:13 +0000)]
*sigh* X11 forwarding to a local display (":0" or similar) specified in the
environment rather than the configuraton was failing as of 0.56 (introduced
in r4604). This probably only bit users of Unix PuTTY. Didn't spot in testing
as I was forwarding to already-forwarded displays. I really wasn't having a
good month that month, was I?

[originally from svn r4816]
[r4604 == 98028c746f08d0e7bf5d8524d6aca85e5a2f4145]

19 years agoAdd an extra appendix to the manual containing PuTTY's (hitherto)
Simon Tatham [Thu, 18 Nov 2004 15:16:18 +0000 (15:16 +0000)]
Add an extra appendix to the manual containing PuTTY's (hitherto)
unwritten design principles, so would-be contributors won't have to
either read our minds or pay _very_ close attention to the code.

[originally from svn r4815]

19 years agoMove MODULE files out of individual project directories into a
Simon Tatham [Thu, 18 Nov 2004 11:30:39 +0000 (11:30 +0000)]
Move MODULE files out of individual project directories into a
MODULES top-level directory, which is where the Tartarus website
scripts will (hopefully) start reading them from.

[originally from svn r4813]
[this svn revision also touched charset,enigma,filter,halibut,puzzles,pycee,sdlgames,timber]

19 years agomkunxarc.sh was still including (mostly empty) .svn directories, and
Simon Tatham [Wed, 17 Nov 2004 18:27:04 +0000 (18:27 +0000)]
mkunxarc.sh was still including (mostly empty) .svn directories, and
that in turn was confusing the new doc/Makefile mechanism. Fixed the
former, and also put an additional safeguard in the latter in a
belt-and-braces sort of fashion.

[originally from svn r4806]

19 years agoNow we use Subversion, it seems excessive to have an individual $Id$
Simon Tatham [Wed, 17 Nov 2004 18:16:59 +0000 (18:16 +0000)]
Now we use Subversion, it seems excessive to have an individual $Id$
line for every single .but file at the bottom of each page of the
HTML PuTTY docs. However, we can't _always_ replace that with a
single SVN revision, because there isn't always one available (SVN
still allows mixed working copies in which some files are
deliberately checked out against a different revision).

Hence, here's a mechanism for doing better. It uses `svnversion .'
to determine _whether_ a single revision number adequately describes
the current directory, and replaces all the version IDs with that if
so. If it can't do that, it uses the version IDs as before.

Also, this allows an explicit version string to be passed on the
make command line which will override _both_ these possibilities, so
that release documentation can be clearly labelled with the release
version number.

[originally from svn r4804]