]> asedeno.scripts.mit.edu Git - PuTTY.git/log
PuTTY.git
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]

19 years agoFix mksrcarc.sh for directory reorganisation.
Simon Tatham [Wed, 17 Nov 2004 08:02:01 +0000 (08:02 +0000)]
Fix mksrcarc.sh for directory reorganisation.

[originally from svn r4797]

19 years agopedantic s/CVS/Subversion/
Jacob Nevins [Tue, 16 Nov 2004 23:58:25 +0000 (23:58 +0000)]
pedantic s/CVS/Subversion/

[originally from svn r4796]

19 years agoSome tweaks for Subversion and windows/ subdir.
Jacob Nevins [Tue, 16 Nov 2004 23:32:57 +0000 (23:32 +0000)]
Some tweaks for Subversion and windows/ subdir.

[originally from svn r4794]

19 years agoFix Windows installer script: the paths were wrong after the
Simon Tatham [Tue, 16 Nov 2004 23:26:22 +0000 (23:26 +0000)]
Fix Windows installer script: the paths were wrong after the
directory reorganisation, and also the EOL style needs to be CRLF or
Inno Setup gets upset.

[originally from svn r4793]

19 years agoNow that we have Subversion's file renaming ability, it's time at
Simon Tatham [Tue, 16 Nov 2004 22:14:56 +0000 (22:14 +0000)]
Now that we have Subversion's file renaming ability, it's time at
long last to move all the Windows-specific source files down into a
`windows' subdirectory. Only platform-specific files remain at the
top level. With any luck this will act as a hint to anyone still
contemplating sending us a Windows-centric patch...

[originally from svn r4792]

19 years agoVarious changes related to the Subversion migration.
Simon Tatham [Tue, 16 Nov 2004 18:01:39 +0000 (18:01 +0000)]
Various changes related to the Subversion migration.

[originally from svn r4790]

19 years agoRemove .cvsignore files on all active branches.
Simon Tatham [Tue, 16 Nov 2004 15:29:14 +0000 (15:29 +0000)]
Remove .cvsignore files on all active branches.

[originally from svn r4788]
[this svn revision also touched bmbm,caltrap,charset,enigma,filter,fonts,golem,grunge,halibut,html,lj,local,misc,polyhedra,putty-website,putty-wishlist,puzzles,pycee,sdlgames,svn-tools,timber,tweak]

19 years agoMention that comp.terminals may also be a useful newsgroup.
Jacob Nevins [Mon, 15 Nov 2004 15:57:28 +0000 (15:57 +0000)]
Mention that comp.terminals may also be a useful newsgroup.
I've done this by centralising information about newsgroups in feedback.but
and linking to that from elsewhere; I've also put in a link to Google Groups.

[originally from svn r4781]

19 years agoMiloslav Cempirek Ing points out that we should return from
Simon Tatham [Mon, 15 Nov 2004 11:10:36 +0000 (11:10 +0000)]
Miloslav Cempirek Ing points out that we should return from
sessionsaver_handler after processing a one-click saved session
launch, to protect against accidentally calling dlg_end twice on the
same dialog.

[originally from svn r4779]

19 years agoI masked off LATTR_WRAPPED et al in do_text_internal(), but forgot
Simon Tatham [Thu, 11 Nov 2004 09:40:50 +0000 (09:40 +0000)]
I masked off LATTR_WRAPPED et al in do_text_internal(), but forgot
to do the same in do_cursor(). Bet that's the cause of Andrey
Borzenkov's cursor positioning bug.

[originally from svn r4770]

19 years agoDJSD requests a force-monochrome option for users who dislike angry-
Simon Tatham [Tue, 9 Nov 2004 17:57:32 +0000 (17:57 +0000)]
DJSD requests a force-monochrome option for users who dislike angry-
fruit-salad applications :-)

[originally from svn r4762]

19 years agoNote upper limit of WM_SYSCOMMAND identifiers in a comment.
Jacob Nevins [Tue, 2 Nov 2004 23:06:43 +0000 (23:06 +0000)]
Note upper limit of WM_SYSCOMMAND identifiers in a comment.

[originally from svn r4734]

19 years agoGo back to using intervals of 16 for the saved session identifiers for the
Jacob Nevins [Tue, 2 Nov 2004 23:06:20 +0000 (23:06 +0000)]
Go back to using intervals of 16 for the saved session identifiers for the
system menu, but expand from 256 entries to 1024 as there seems to be plenty
of space.

Also remove a couple of unused IDM_* constants.

[originally from svn r4733]

19 years agoSimon has reminded me _why_ menu identifiers were spaced every sixteen, so
Jacob Nevins [Tue, 2 Nov 2004 22:30:24 +0000 (22:30 +0000)]
Simon has reminded me _why_ menu identifiers were spaced every sixteen, so
let's add a comment so that we don't forget again. Source:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardaccelerators/keyboardacceleratorreference/keyboardacceleratormessages/wm_syscommand.asp>

[originally from svn r4732]

19 years agoSince neither I nor Owen know why the IDM_ values for the saved-sessions
Jacob Nevins [Tue, 2 Nov 2004 17:44:06 +0000 (17:44 +0000)]
Since neither I nor Owen know why the IDM_ values for the saved-sessions
submenu were going up in steps of 16, I've changed to steps of 1, thus
increasing the possible number of sessions from ~256 to 4096, since a
recent report seemed to indicate that the previous limit might not be
enough for someone (!)
I can't find any documentation that puts an upper limit on the number of
menu items, and it seems to work on Win98, which is where I'd expect it to
break if anywhere.
Also a number of other tweaks to this code.

[originally from svn r4731]

19 years agoArgh, I messed up SSH1 remote tunnels too (same mistake).
Jacob Nevins [Mon, 1 Nov 2004 14:18:37 +0000 (14:18 +0000)]
Argh, I messed up SSH1 remote tunnels too (same mistake).

[originally from svn r4728]

19 years agoAhem, let's not try initialising a static with a non-constant initialiser.
Jacob Nevins [Mon, 1 Nov 2004 00:47:37 +0000 (00:47 +0000)]
Ahem, let's not try initialising a static with a non-constant initialiser.

Also, I'm pretty sure that adding a source address to a remote SSH-2 forwarding
can never have worked, since we added an address string to the packet twice in
that case. OpenSSH 3.4p1 certainly doesn't like it (`Server has disabled port
forwarding' debug message). Fixed (and OpenSSH is happier now).

[originally from svn r4727]

19 years agoArgh. Failure to make a variable static to get round coroutine
Jacob Nevins [Mon, 1 Nov 2004 00:17:31 +0000 (00:17 +0000)]
Argh. Failure to make a variable static to get round coroutine
mechanics means that each SSH-2 remote tunnel will sfree() something
random and thus have a chance of crashing or doing something else
bad, although it won't otherwise affect execution. Introduced in
1.319 [r4529] (some of my improved diagnostics). One day I'll make a
checkin to ssh.c without forgetting about the coroutines...

[originally from svn r4725]
[r4529 == 27193c4bf06711d74789f91589f38977b12415f8]

19 years agoMalcolm Rowe spotted that we broke display of SSH2_MSG_DEBUG messages while
Jacob Nevins [Thu, 28 Oct 2004 00:23:44 +0000 (00:23 +0000)]
Malcolm Rowe spotted that we broke display of SSH2_MSG_DEBUG messages while
fixing `vuln-ssh2-debug', by missing out a field. In most cases
(always_display = 0) we would log a zero-length or truncated message.

(Also add a prototype for ssh2_pkt_getbool().)

[originally from svn r4718]

19 years agoMalcolm Rowe's UI tweak patch for About/Licence: recognise `Esc' to close
Jacob Nevins [Wed, 27 Oct 2004 15:50:52 +0000 (15:50 +0000)]
Malcolm Rowe's UI tweak patch for About/Licence: recognise `Esc' to close
windows (PuTTY, Pageant, PuTTYgen); Licence window parent in PuTTY.

[originally from svn r4715]

19 years agoGood grief! I should create the `htmldoc' subdir in the release tree
Simon Tatham [Tue, 26 Oct 2004 19:47:35 +0000 (19:47 +0000)]
Good grief! I should create the `htmldoc' subdir in the release tree
_before_ I create the md5sums files. I am a gibbon.

[originally from svn r4702]

19 years agoAdd bumping version number on trunk to new post-release checklist.
Jacob Nevins [Tue, 26 Oct 2004 19:32:25 +0000 (19:32 +0000)]
Add bumping version number on trunk to new post-release checklist.
Also, sometimes `0.XX' is used in the docs as a placeholder for a version
number.

[originally from svn r4700]

19 years agoMerge version number bump (0.56) from release branch.
Jacob Nevins [Tue, 26 Oct 2004 18:59:39 +0000 (18:59 +0000)]
Merge version number bump (0.56) from release branch.

[originally from svn r4699]

19 years agoReorder a couple of points on the wishlist, and also add a few
Simon Tatham [Tue, 26 Oct 2004 18:44:42 +0000 (18:44 +0000)]
Reorder a couple of points on the wishlist, and also add a few
helpful chunks of `sh' to make life easier next time I make a release.

[originally from svn r4698]

19 years agoAdd a note about documentation of the Unix port (i.e., we don't, specifically).
Jacob Nevins [Sun, 24 Oct 2004 22:57:36 +0000 (22:57 +0000)]
Add a note about documentation of the Unix port (i.e., we don't, specifically).
This is mainly intended to make the documentation suitable for including in
distributions such as the Debian package, but won't be amiss on the web site
docs. It will look a bit out of place in the .HLP, but never mind.

[originally from svn r4690]

19 years agoMention -i.
Jacob Nevins [Sun, 24 Oct 2004 18:30:10 +0000 (18:30 +0000)]
Mention -i.

[originally from svn r4688]

19 years agoRandom tweaks:
Jacob Nevins [Sun, 24 Oct 2004 18:26:00 +0000 (18:26 +0000)]
Random tweaks:
 - change click-by-click advice on modifying saved sessions
 - add `Restart Session' as another reason you might not want to close the
   window on exit; other tweaks to this language
 - mention Shift-Backspace action
 - the window resizing configuration documentation was completely out of
   date; rewrite
 - add a note about Default Bold Background since it's caused confusion
 - "remote terminal" -> "remote system" in terminal-type doc

[originally from svn r4686]

19 years agoFreshness tweaks:
Jacob Nevins [Sun, 24 Oct 2004 16:48:43 +0000 (16:48 +0000)]
Freshness tweaks:
 - mention `Restart Session'
 - tweak language of `-N' (plural->singular)

[originally from svn r4684]

19 years agoFreshness tweaks:
Jacob Nevins [Sun, 24 Oct 2004 16:24:58 +0000 (16:24 +0000)]
Freshness tweaks:
 - soften language around changing-username-during-login section; with SSH-2
   this is a misfeature of implementations rather than the protocol itself
 - tweak new-host-key dialog text

[originally from svn r4681]

19 years agoDifferences between protocols: remove the entire paragraph about environment
Jacob Nevins [Sun, 24 Oct 2004 15:58:31 +0000 (15:58 +0000)]
Differences between protocols: remove the entire paragraph about environment
variables. It was no longer true (given that we support them in SSH-2 now),
and the new situation was probably too complex to explain in an introductory
chapter. And the utility of setting them seems to be marginal these days given
the lack of server support.

[originally from svn r4679]

19 years agoMention PSFTP on title page
Jacob Nevins [Sun, 24 Oct 2004 15:41:44 +0000 (15:41 +0000)]
Mention PSFTP on title page

[originally from svn r4678]

19 years agoBetter bounds checking in the exit-signal handler.
Simon Tatham [Fri, 22 Oct 2004 16:50:51 +0000 (16:50 +0000)]
Better bounds checking in the exit-signal handler.

[originally from svn r4670]

19 years agoWe ought to be using the ssh_pkt_* routines for the messages which we
Simon Tatham [Fri, 22 Oct 2004 16:47:46 +0000 (16:47 +0000)]
We ought to be using the ssh_pkt_* routines for the messages which we
process at any time in the rdpkt routines, as well as everywhere else.

[originally from svn r4669]

19 years agoI just had a need to decode a piece of Zlib data from out of the
Simon Tatham [Thu, 21 Oct 2004 10:59:53 +0000 (10:59 +0000)]
I just had a need to decode a piece of Zlib data from out of the
middle of a PDF. So here's a modification to sshzlib.c which enables
it to be compiled into a standalone Zlib decoder if you define
ZLIB_STANDALONE. As an added bonus, it (both standalone and in
PuTTY) also validates the Zlib header, just to make sure someone
hasn't defined a new compression format.

[originally from svn r4657]

19 years agoMunge line-drawing description to match current naming and order of options
Jacob Nevins [Tue, 19 Oct 2004 13:54:50 +0000 (13:54 +0000)]
Munge line-drawing description to match current naming and order of options
(in the Windows version), and hopefully to clarify distinction between line
charset and local font, which has occasionally foxed me.

Cross-reference the Translation panel reference section from the intro
section in using.but and mention line-drawing characters there also.

[originally from svn r4654]

19 years agoAdd support for logging "exit-signal", why not.
Jacob Nevins [Mon, 18 Oct 2004 00:41:48 +0000 (00:41 +0000)]
Add support for logging "exit-signal", why not.

This is disgustingly huge because old versions of OpenSSH got the message
format wrong, so we have to infer which format is in use. Tested with
Debian stable OpenSSH (3.4p1), with `uint32' packet, and lshd, which uses
the correct `string' packet, and also let me test "core dumped" and the
explanatory message.

[originally from svn r4653]

19 years agoSupport the SSH-2 mechanism for sending signals to a running session. Neither
Jacob Nevins [Sun, 17 Oct 2004 21:22:22 +0000 (21:22 +0000)]
Support the SSH-2 mechanism for sending signals to a running session. Neither
of the SSH servers I conveniently have access to (Debian stable OpenSSH --
3.4p1 -- and lshd) seem to take a blind bit of notice, but the channel
requests look fine to me in the packet log.

I've included all the signals explicitly defined by
draft-ietf-secsh-connect-19, but I've put the more obscure ones in a submenu
of the specials menu; there's therefore been some minor upheaval to support
such submenus.

[originally from svn r4652]

19 years agoWe shouldn't offer the Break special when we don't have a session to send it
Jacob Nevins [Sun, 17 Oct 2004 15:32:42 +0000 (15:32 +0000)]
We shouldn't offer the Break special when we don't have a session to send it
down. (A side effect of fixing this is that ssh->mainchain is set to NULL
when it closes, which might avoid other sorts of trouble.)

While we're here, don't bother offering SSH1_MSG_IGNORE if we believe the
remote will barf on it.

[originally from svn r4650]

19 years agoTelnet specials menu was not being reinstated after a session was restarted in
Jacob Nevins [Sun, 17 Oct 2004 14:44:27 +0000 (14:44 +0000)]
Telnet specials menu was not being reinstated after a session was restarted in
the same window (Windows version only).

Policy change: it's now the backend's responsibility to call
update_specials_menu() at the start of a session (or whenever it feels ready),
if it has any special commands. Otherwise the menu won't be displayed.

[originally from svn r4649]

19 years agoMarkus Kuhn's UTF-8 page
Simon Tatham [Sat, 16 Oct 2004 14:17:58 +0000 (14:17 +0000)]
Markus Kuhn's UTF-8 page
  http://www.cl.cam.ac.uk/~mgk25/unicode.html#activate
feels strongly that it should be easy to make _all_ your
applications work in UTF-8 mode, without having to remember a switch
for each one. Every application should simply note a UTF-8 locale
setting and switch into UTF-8 mode automatically.

Therefore, for the Unix port only, there's now a checkbox, enabled
by default, which causes the drop-down Translation box to be
overridden if the locale indicates UTF-8. Anyone who doesn't like
this, or doesn't like MGK, is welcome to turn it straight back off.

I'm not _completely_ convinced by MGK's argument myself; for
xterm/pterm to do _useful_ UTF-8 you also need to specify a decently
Unicode-capable font, and there's no way _that_ can be automagically
done on noticing a locale setting. But it's a de facto standard
(i.e. xterm does it :-) so I might as well at least be _able_ to
support it.

[originally from svn r4648]

19 years agoFix bug in scrollback compression, which manifested when attempting
Simon Tatham [Sat, 16 Oct 2004 12:36:50 +0000 (12:36 +0000)]
Fix bug in scrollback compression, which manifested when attempting
to encode a very long (len>128) run of the same literal.

[originally from svn r4647]

19 years agoMoved the environment variables config block out of the Telnet panel
Simon Tatham [Sat, 16 Oct 2004 10:56:54 +0000 (10:56 +0000)]
Moved the environment variables config block out of the Telnet panel
into the Connection panel, and implemented support for the SSH2
"env" request. (I haven't yet found a server which accepts this
request, so although I've visually checked the packet log and it
looks OK, I haven't yet been able to do a full end-to-end test.)
Also, the `pty' backend reads this data and does a series of
`putenv' commands before launching the shell or application.

This is mostly because in last week's UTF-8 faffings I got
thoroughly sick of typing `export LANG=en_GB.UTF-8' every time I
started a new testing pterm, and it suddenly occurred to me that
this would be precisely the sort of thing you'd want to have pterm
set up for you, particularly since you can configure it alongside
the translation settings and so you can ensure they match up
properly.

[originally from svn r4645]

19 years agoMention plink's new -N option in usage and man page.
Jacob Nevins [Fri, 15 Oct 2004 23:32:01 +0000 (23:32 +0000)]
Mention plink's new -N option in usage and man page.

[originally from svn r4643]

19 years agoFix two memory leaks in the new code. (There's no point compressing
Simon Tatham [Fri, 15 Oct 2004 12:37:44 +0000 (12:37 +0000)]
Fix two memory leaks in the new code. (There's no point compressing
the scrollback if you then leak away all the memory you saved!) One
of the leaks - by far the bigger of the two - was in my temporary
diagnostic function cc_check(), which is particularly embarrassing :-)

[originally from svn r4638]

19 years agoAnd fix _cursor_ display on double-width double-width characters (as
Simon Tatham [Fri, 15 Oct 2004 12:25:51 +0000 (12:25 +0000)]
And fix _cursor_ display on double-width double-width characters (as
it were).

[originally from svn r4637]

19 years agoDouble-height and double-width line attributes (ESC#3, ESC#4, ESC#6)
Simon Tatham [Fri, 15 Oct 2004 12:17:48 +0000 (12:17 +0000)]
Double-height and double-width line attributes (ESC#3, ESC#4, ESC#6)
were not working correctly with double-width Unicode characters (CJK).

[originally from svn r4636]

19 years agoAdd missing check_boundary() calls in destructive backspace handler.
Simon Tatham [Fri, 15 Oct 2004 11:51:26 +0000 (11:51 +0000)]
Add missing check_boundary() calls in destructive backspace handler.

[originally from svn r4635]

19 years agoA combining character on U+0020 SPACE stops it from being
Simon Tatham [Fri, 15 Oct 2004 11:42:02 +0000 (11:42 +0000)]
A combining character on U+0020 SPACE stops it from being
`uninteresting' to the clipboard processing.

[originally from svn r4634]

19 years agoMark the trial decompress in every call to compressline() with the
Simon Tatham [Fri, 15 Oct 2004 11:29:02 +0000 (11:29 +0000)]
Mark the trial decompress in every call to compressline() with the
XXX-REMOVE-BEFORE-RELEASE tag.

[originally from svn r4633]

19 years agoDon't forget to flush the bidi cache when the user enables or
Simon Tatham [Fri, 15 Oct 2004 11:14:42 +0000 (11:14 +0000)]
Don't forget to flush the bidi cache when the user enables or
disables bidi or shaping, otherwise they'll have to do a manual
screen refresh to see any difference.

[originally from svn r4632]

19 years agoStore line widths in the bidi cache, so we don't fail to re-bidi a
Simon Tatham [Fri, 15 Oct 2004 11:11:19 +0000 (11:11 +0000)]
Store line widths in the bidi cache, so we don't fail to re-bidi a
line when the window size changes.

[originally from svn r4631]

19 years agoFix many bugs in resizeline().
Simon Tatham [Fri, 15 Oct 2004 10:48:27 +0000 (10:48 +0000)]
Fix many bugs in resizeline().

[originally from svn r4629]

19 years agoFix applying combining characters to double-width characters.
Simon Tatham [Fri, 15 Oct 2004 09:28:46 +0000 (09:28 +0000)]
Fix applying combining characters to double-width characters.

[originally from svn r4628]

19 years agoFix Windows redraw problem on RH half of wrapped lines. (term_paint
Simon Tatham [Fri, 15 Oct 2004 09:16:58 +0000 (09:16 +0000)]
Fix Windows redraw problem on RH half of wrapped lines. (term_paint
was checking whether lattr == LATTR_NORM, where it should have been
checking (lattr & LATTR_MODE) to mask off LATTR_WRAPPED et al.

[originally from svn r4627]

19 years agoI broke ordinary line wrapping as a result of retiring cpos. Oops.
Simon Tatham [Fri, 15 Oct 2004 09:06:45 +0000 (09:06 +0000)]
I broke ordinary line wrapping as a result of retiring cpos. Oops.

[originally from svn r4626]

19 years agoFix cursor display on a combined character cell.
Simon Tatham [Fri, 15 Oct 2004 08:51:57 +0000 (08:51 +0000)]
Fix cursor display on a combined character cell.

[originally from svn r4625]

19 years agoMark cc_check() and all calls to it with the new
Simon Tatham [Fri, 15 Oct 2004 08:22:49 +0000 (08:22 +0000)]
Mark cc_check() and all calls to it with the new
XXX-REMOVE-BEFORE-RELEASE tag, since they're performance-intensive.
And now that I'm reasonably confident of remembering to remove them
before the next release, I feel less guilty about adding them willy-
nilly all over the place, so I've shoved in a couple more for now :-)

[originally from svn r4624]

19 years agoI'm instituting a policy that before every release I will grep the
Simon Tatham [Fri, 15 Oct 2004 08:16:29 +0000 (08:16 +0000)]
I'm instituting a policy that before every release I will grep the
PuTTY source for the word XXX-REMOVE-BEFORE-RELEASE, and not release
until I've got rid of all of them. Hence, here's an addition to the
release checklist which will remind me to do so.

I don't want this mechanism to seriously inhibit a release by being
a placeholder for a large piece of work we might never get round to.
It should be used only in cases where it's _simple_ to change the
offending code: for example, a performance-impacting diagnostic
might be invaluable while testing nightly snapshots but wouldn't
want to slow down everyone's next release, and it's easy to get rid
of on release day.

[originally from svn r4623]

19 years agoFirst-stage support for Unicode combining characters. The `chars'
Simon Tatham [Thu, 14 Oct 2004 16:42:43 +0000 (16:42 +0000)]
First-stage support for Unicode combining characters. The `chars'
array of each `termline' structure now contains optional additional
entries after the normal number of columns, which are used to chain
a linked list of combining characters off any primary termchar that
needs it. This means we support arbitrarily many combining
characters per cell (unlike xterm's hard limit of 2).

Cut and paste works correctly (selecting a character cell containing
multiple code points causes all those code points to be cut and
pasted). Display works by simply overlaying all the relevant
characters on top of one another; this is good enough for Unix
(xterm does the same thing), and mostly seems OK for Windows except
that the Windows Unicode fonts have a nasty habit of not containing
most of the combining characters and thus overlaying an
unknown-code-point box on your perfectly good base glyph.

I had no idea how to add support in the Mac do_text(), so I've
simply stuck in an assertion that will trigger the first time a
combining character is displayed, and hopefully this will bite
someone with the clue to fix it.

[originally from svn r4622]

19 years agoImplement part of `ssh2-generality': introduce the ability to tell
Simon Tatham [Wed, 13 Oct 2004 13:43:11 +0000 (13:43 +0000)]
Implement part of `ssh2-generality': introduce the ability to tell
PuTTY / Plink not to run a remote shell/command at all. Supported in
the GUI configuration and via the (OpenSSH-like) -N command-line
option.

No effort is currently made to arrange `nice' UI properties. If you
do this in GUI PuTTY, a full-size terminal window will still be
created, and will sit there with almost nothing in it throughout
your session. If you do it in Plink, Plink will not accept any kind
of request to terminate gracefully; you'll have to ^C or kill it.
Nonetheless, even this little will be useful to some people...

[originally from svn r4614]

19 years agoFix segfaults in terminal resizing, introduced by re-engineering.
Simon Tatham [Wed, 13 Oct 2004 13:35:29 +0000 (13:35 +0000)]
Fix segfaults in terminal resizing, introduced by re-engineering.

[originally from svn r4613]

19 years agoI think we've been told before that you're not supposed to
Simon Tatham [Wed, 13 Oct 2004 12:29:50 +0000 (12:29 +0000)]
I think we've been told before that you're not supposed to
CloseHandle() the thing returned from MonitorFromPoint. Certainly MS
Visual Studio's debugger complained about it just now. CloseHandle()
call removed.

[originally from svn r4612]

19 years agoFix '/*' in comment.
Jacob Nevins [Wed, 13 Oct 2004 12:10:30 +0000 (12:10 +0000)]
Fix '/*' in comment.

[originally from svn r4611]

19 years agoRe-engineering of terminal emulator, phase 1.
Simon Tatham [Wed, 13 Oct 2004 11:50:16 +0000 (11:50 +0000)]
Re-engineering of terminal emulator, phase 1.

The active terminal screen is no longer an array of `unsigned long'
encoding 16-bit Unicode plus 16 attribute bits. Now it's an array of
`termchar' structures, which currently have 32-bit Unicode and 32
attribute bits but which will probably expand further in future.

To prevent bloat of the memory footprint, I've introduced a mostly
RLE-like compression scheme for storing scrollback: each line is
compressed into a compact (but hard to modify) form when it moves
into the term->scrollback tree, and is temporarily decompressed when
the user wants to scroll back over it. My initial tests suggest that
this compression averages about 1/4 of the previous (32 bits per
character cell) data size in typical output, which means this is an
improvement even without counting the new ability to extend the
information stored in each character cell.

Another beneficial side effect is that the insane format in which
Unicode was passed to front ends through do_text() has now been
rendered sane.

Testing is incomplete; this _may_ still have instabilities. Windows
and Unix front ends both seem to work as far as I've looked, but I
haven't yet looked very hard. The Mac front end I've edited (it
seemed obvious how to change it) but I can't compile or test it.

As an immediate functional effect, the terminal emulator now
supports full 32-bit Unicode to whatever extent the host platform
allows it to. For example, if you output a 4-or-more-byte UTF-8
character in Unix pterm, it will not display it properly, but it
will correctly paste it back out in a UTF8_STRING selection. Windows
is more restricted, sadly.

[originally from svn r4609]

19 years agofaq-alternate-localhost: You can now download the fix directly rather than
Jacob Nevins [Fri, 8 Oct 2004 12:38:08 +0000 (12:38 +0000)]
faq-alternate-localhost: You can now download the fix directly rather than
having to go through MS support.

[originally from svn r4607]

19 years agofaq-permission: xref licence
Jacob Nevins [Thu, 7 Oct 2004 10:19:46 +0000 (10:19 +0000)]
faq-permission: xref licence

[originally from svn r4606]

19 years agoX forwarding changes:
Jacob Nevins [Wed, 6 Oct 2004 22:31:07 +0000 (22:31 +0000)]
X forwarding changes:
 - new function platform_get_x_display() to find a sensible local display.
   On Unix, the Gtk apps weren't taking account of --display when
   determining where to send forwarded X traffic.
 - explicitly document that leaving X display location blank in config tries
   to do something sensible (and that it's now blank by default)
 - don't override X11Display setting in plink, since that's more properly
   done later

[originally from svn r4604]

19 years ago`ssh-log-pw-blank': known password fields are now omitted from SSH packet logs
Jacob Nevins [Sat, 2 Oct 2004 00:33:27 +0000 (00:33 +0000)]
`ssh-log-pw-blank': known password fields are now omitted from SSH packet logs
by default (although they can be included). There's also an option to remove
session data, which is good both for privacy and for reducing the size of
logfiles.

[originally from svn r4593]

19 years agoMention the negotiated SSH-2 MAC algorithm(s) in the Event Log.
Jacob Nevins [Wed, 29 Sep 2004 23:57:03 +0000 (23:57 +0000)]
Mention the negotiated SSH-2 MAC algorithm(s) in the Event Log.
(It should be possible to at least see what MAC is in use without going to a
SSH packet log.)

[originally from svn r4591]

19 years agoReport details in Event Log when receiving SSH2_MSG_CHANNEL_OPEN_FAILURE.
Simon Tatham [Wed, 29 Sep 2004 12:38:45 +0000 (12:38 +0000)]
Report details in Event Log when receiving SSH2_MSG_CHANNEL_OPEN_FAILURE.

[originally from svn r4589]

19 years agoLine (as opposed to block) cursors were being displayed when they shouldn't
Jacob Nevins [Tue, 28 Sep 2004 20:42:39 +0000 (20:42 +0000)]
Line (as opposed to block) cursors were being displayed when they shouldn't
have been, including when they were blinked off. Fixes Debian bug #272877.

[originally from svn r4586]

19 years ago"Incoming packet was garbled on decryption": I think this could in principle
Jacob Nevins [Mon, 27 Sep 2004 00:23:19 +0000 (00:23 +0000)]
"Incoming packet was garbled on decryption": I think this could in principle
be due to corruption on the wire?

[originally from svn r4582]