u/mdw/putty
19 years agoWork around lcc's annoying (but, even more annoyingly, legitimate)
simon [Sat, 19 Mar 2005 16:34:58 +0000 (16:34 +0000)]
Work around lcc's annoying (but, even more annoyingly, legitimate)
refusal to allow comparison of function pointers. Unfortunately this
still doesn't cause PuTTY to compile on my lcc installation, because
the GetCharacterPlacement stuff in exact_textout() is missing from
its header files. This may have been fixed in a future version (I'm
using lcc-win32 version 3.8 from December 2003), but I haven't
checked.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5527 cda61777-01e9-0310-a592-d414129be87e

19 years agoMore compact display for the key links/fingerprints. Still not ideal, but
jacob [Sat, 19 Mar 2005 03:05:44 +0000 (03:05 +0000)]
More compact display for the key links/fingerprints. Still not ideal, but
it'll probably do.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5526 cda61777-01e9-0310-a592-d414129be87e

19 years agoSet SVN properties on udp.but the same as everything else
jacob [Sat, 19 Mar 2005 02:29:57 +0000 (02:29 +0000)]
Set SVN properties on udp.but the same as everything else

git-svn-id: svn://svn.tartarus.org/sgt/putty@5525 cda61777-01e9-0310-a592-d414129be87e

19 years agoTry to make our PGP signing more useful:
jacob [Sat, 19 Mar 2005 02:26:58 +0000 (02:26 +0000)]
Try to make our PGP signing more useful:

 * All the PuTTY tools for Windows and Unix now contain the fingerprints of
   the Master Keys. The method for accessing them is crude but universal:
   a new "-pgpfp" command-line option. (Except Unix PuTTYgen, which takes
   "--pgpfp" just to be awkward.)

 * Move the key policy discussion from putty-website/keys.html to
   putty/doc/pgpkeys.but, and autogenerate the former from the latter.
   Also tweak the text somewhat and include the fingerprints of the
   Master Keys themselves.
   (I've merged the existing autogeneration scripts into a single new
   one; I've left the old scripts and keys.html around until such time
   as the webmonster reviews the changes and plumbs in the new script;
   he should remove the old files then.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5524 cda61777-01e9-0310-a592-d414129be87e

19 years agoAfter we thaw a frozen socket, we apparently need to restart the
simon [Fri, 18 Mar 2005 19:47:21 +0000 (19:47 +0000)]
After we thaw a frozen socket, we apparently need to restart the
WSAAsyncSelect or else Windows loses read events.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5521 cda61777-01e9-0310-a592-d414129be87e

19 years agoI believe MAC/CRC errors can be caused by network corruption, in principle.
jacob [Fri, 18 Mar 2005 12:58:39 +0000 (12:58 +0000)]
I believe MAC/CRC errors can be caused by network corruption, in principle.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5520 cda61777-01e9-0310-a592-d414129be87e

19 years agoHung-Te Lin's fix for intermittent WM_PAINT problems.
simon [Thu, 17 Mar 2005 20:01:28 +0000 (20:01 +0000)]
Hung-Te Lin's fix for intermittent WM_PAINT problems.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5518 cda61777-01e9-0310-a592-d414129be87e

19 years agoThe structural reorganisation of ssh.c (r4909) caused
simon [Thu, 17 Mar 2005 19:49:51 +0000 (19:49 +0000)]
The structural reorganisation of ssh.c (r4909) caused
ssh2_try_send() to no longer be run after receiving WINDOW_ADJUSTs.
I believe this is likely to have been the cause of recent PSCP
hanging issues.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5517 cda61777-01e9-0310-a592-d414129be87e

19 years agofaq-savedsettings: mention Default Settings
jacob [Wed, 16 Mar 2005 16:09:44 +0000 (16:09 +0000)]
faq-savedsettings: mention Default Settings

git-svn-id: svn://svn.tartarus.org/sgt/putty@5514 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix `telnet-option-loop', I think. (Untested except to check it
simon [Wed, 16 Mar 2005 13:20:02 +0000 (13:20 +0000)]
Fix `telnet-option-loop', I think. (Untested except to check it
compiles, since I don't have a suitably awkward server to run it
against; but Ben reviewed the patch before checkin so we can share
the blame if it doesn't work.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5512 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd protection against multiple Change Settings dialogues.
owen [Tue, 15 Mar 2005 20:34:08 +0000 (20:34 +0000)]
Add protection against multiple Change Settings dialogues.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5508 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix pterm-logtype-crash
owen [Tue, 15 Mar 2005 10:43:29 +0000 (10:43 +0000)]
Fix pterm-logtype-crash

git-svn-id: svn://svn.tartarus.org/sgt/putty@5505 cda61777-01e9-0310-a592-d414129be87e

19 years agoConsistent indenting in option specs
jacob [Mon, 14 Mar 2005 01:56:39 +0000 (01:56 +0000)]
Consistent indenting in option specs

git-svn-id: svn://svn.tartarus.org/sgt/putty@5502 cda61777-01e9-0310-a592-d414129be87e

19 years agopunctuation nit
jacob [Fri, 11 Mar 2005 21:05:12 +0000 (21:05 +0000)]
punctuation nit

git-svn-id: svn://svn.tartarus.org/sgt/putty@5495 cda61777-01e9-0310-a592-d414129be87e

19 years agoRetire MINGW32_FIX. It was a fix for a blatant bug in MinGW's windres, which
jacob [Fri, 11 Mar 2005 15:52:59 +0000 (15:52 +0000)]
Retire MINGW32_FIX. It was a fix for a blatant bug in MinGW's windres, which
was fixed in CVS in 2000 (I think); and we now depend on MinGW much more
recent than that for various other reasons. I've tested with my current
MinGW (around 2.0.0 vintage) and the original symptoms (dodgy characters in
edit boxes) don't appear to show up.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5491 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake it clearer which protocol version various bugs apply to.
jacob [Fri, 11 Mar 2005 15:24:09 +0000 (15:24 +0000)]
Make it clearer which protocol version various bugs apply to.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5490 cda61777-01e9-0310-a592-d414129be87e

19 years agoFiddle with source archive for new OS X files.
simon [Fri, 11 Mar 2005 09:07:37 +0000 (09:07 +0000)]
Fiddle with source archive for new OS X files.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5489 cda61777-01e9-0310-a592-d414129be87e

19 years agoThanks to D H Becker for sending in an icon. I'd have liked to have
simon [Thu, 10 Mar 2005 20:11:27 +0000 (20:11 +0000)]
Thanks to D H Becker for sending in an icon. I'd have liked to have
written a script which would generate the various graphical
components of the PuTTY icon suite at any given resolution and then
used that to generate the OS X icon as well as all the others, but I
can always do that later; this'll do for now.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5487 cda61777-01e9-0310-a592-d414129be87e

19 years agoExpand "v" to "version" when discussing SSH protocol versions.
ben [Thu, 10 Mar 2005 17:08:37 +0000 (17:08 +0000)]
Expand "v" to "version" when discussing SSH protocol versions.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5486 cda61777-01e9-0310-a592-d414129be87e

19 years agoWhen we're quoting user-interface text from PuTTY 0.51, we probably shouldn't
ben [Thu, 10 Mar 2005 17:08:00 +0000 (17:08 +0000)]
When we're quoting user-interface text from PuTTY 0.51, we probably shouldn't
correct its spelling of "SSH-2".

git-svn-id: svn://svn.tartarus.org/sgt/putty@5485 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix an "SSH v1" that Jacob missed (because it spanned a line break).
ben [Thu, 10 Mar 2005 17:06:29 +0000 (17:06 +0000)]
Fix an "SSH v1" that Jacob missed (because it spanned a line break).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5484 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake it clear that even when using SSH 2, you only need the SSH-2 pubkey format
ben [Thu, 10 Mar 2005 17:04:26 +0000 (17:04 +0000)]
Make it clear that even when using SSH 2, you only need the SSH-2 pubkey format
if you're actually using the SSH-2 protocol.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5483 cda61777-01e9-0310-a592-d414129be87e

19 years agoConsistently use a single notation to refer to SSH protocol versions, as
jacob [Thu, 10 Mar 2005 16:36:05 +0000 (16:36 +0000)]
Consistently use a single notation to refer to SSH protocol versions, as
discussed. Use Barrett and Silverman's convention of "SSH-1" for SSH protocol
version 1 and "SSH-2" for protocol 2 ("SSH1"/"SSH2" refer to ssh.com
implementations in this scheme). <http://www.snailbook.com/terms.html>

git-svn-id: svn://svn.tartarus.org/sgt/putty@5480 cda61777-01e9-0310-a592-d414129be87e

19 years agoSupport multiple anchor name types now that Jacob has enhanced
simon [Thu, 10 Mar 2005 16:18:51 +0000 (16:18 +0000)]
Support multiple anchor name types now that Jacob has enhanced
Halibut to be able to do so.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5479 cda61777-01e9-0310-a592-d414129be87e

19 years agoProtect against multiple Change Settings dialogues. We should probably also
owen [Thu, 10 Mar 2005 10:07:27 +0000 (10:07 +0000)]
Protect against multiple Change Settings dialogues.  We should probably also
arrange to switch to an existing Change Settings if the user selects the
menu item and we already have a Change Settings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5475 cda61777-01e9-0310-a592-d414129be87e

19 years agoBen Hutchings reports that new PuTTY instances created from the saved
jacob [Tue, 8 Mar 2005 23:06:15 +0000 (23:06 +0000)]
Ben Hutchings reports that new PuTTY instances created from the saved
sessions menu (etc) can inherit listening sockets, and that this sometimes
causes trouble. Can't reproduce any problems myself, but let's only allow
inheritance when absolutely necessary -- Duplicate Session -- in which
case there's already going to be trouble with two processes trying to
listen on the same port.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5468 cda61777-01e9-0310-a592-d414129be87e

19 years agoMiscellaneous tweaks.
jacob [Tue, 8 Mar 2005 14:20:38 +0000 (14:20 +0000)]
Miscellaneous tweaks.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5461 cda61777-01e9-0310-a592-d414129be87e

19 years agoCharlie at work points out that the screen FAQ contains a different
simon [Mon, 7 Mar 2005 16:40:11 +0000 (16:40 +0000)]
Charlie at work points out that the screen FAQ contains a different
- and probably better - solution to the screen-vs-alt-screen issue.
Reference it and describe the fix.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5452 cda61777-01e9-0310-a592-d414129be87e

19 years ago`What commands can I type into my PuTTY session' is probably the
simon [Mon, 7 Mar 2005 14:07:19 +0000 (14:07 +0000)]
`What commands can I type into my PuTTY session' is probably the
single most frequently asked thing which isn't in the FAQ (it's in
feedback.but instead), so let's add it. I'm uncertain that the
people who mail us asking things like `how do I read my email' and
`how do I access $database' will successfully recognise this more
general question as one which includes their specific one, but it's
worth a try.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5451 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd notification when using the various auth methods with server-supplied
jacob [Sun, 6 Mar 2005 16:38:19 +0000 (16:38 +0000)]
Add notification when using the various auth methods with server-supplied
prompts, to make it more obvious if a server is attempting to spoof a local
passphrase prompt.

I believe an alert user could have spotted this in all cases in SSH-2,
although perhaps not in SSH-1. (But they'd have to have enabled
TIS/CryptoCard.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5450 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix sense of test in previous checkin :)
jacob [Sun, 6 Mar 2005 15:00:45 +0000 (15:00 +0000)]
Fix sense of test in previous checkin :)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5448 cda61777-01e9-0310-a592-d414129be87e

19 years agoI'm sick and tired of the persistent reports of lineptr() failing
simon [Sun, 6 Mar 2005 14:48:22 +0000 (14:48 +0000)]
I'm sick and tired of the persistent reports of lineptr() failing
its `line != NULL' assertion, so I've replaced the assertion with a
call to fatalbox() giving oodles of information. I may still not be
able to reproduce it, but at least next time it happens we should
see a decent amount of debugging data!

git-svn-id: svn://svn.tartarus.org/sgt/putty@5447 cda61777-01e9-0310-a592-d414129be87e

19 years agoOver-enthusiastic assertions in the port forwarding code removed.
simon [Sat, 5 Mar 2005 18:14:57 +0000 (18:14 +0000)]
Over-enthusiastic assertions in the port forwarding code removed.
Port forwardings are set up before initialising the last few details
of the main shell session, so ssh->state can reasonably hold values
other than SSH_STATE_SESSION and SSH_STATE_CLOSED during calls to
sshfwd_*.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5446 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake sure we do notify_remote_exit(ssh->frontend) _before_
simon [Sat, 5 Mar 2005 17:56:28 +0000 (17:56 +0000)]
Make sure we do notify_remote_exit(ssh->frontend) _before_
connection_fatal(), since the latter is entitled to destroy the
backend so `ssh' may no longer be valid once it returns.

For the Unix port, switch exit(0) to gtk_main_quit() in
notify_remote_exit(), so that we don't exit before the subsequent
connection_fatal()!

git-svn-id: svn://svn.tartarus.org/sgt/putty@5445 cda61777-01e9-0310-a592-d414129be87e

19 years agoPlatform-independent fixes for NO_IPV6 compilation (prevent
simon [Sat, 5 Mar 2005 15:05:18 +0000 (15:05 +0000)]
Platform-independent fixes for NO_IPV6 compilation (prevent
segfaults on trying to access pfd->addressfamily which doesn't exist).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5444 cda61777-01e9-0310-a592-d414129be87e

19 years agoFixes for NO_IPV6 compilation under Unix.
simon [Sat, 5 Mar 2005 15:04:48 +0000 (15:04 +0000)]
Fixes for NO_IPV6 compilation under Unix.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5443 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix potential fault where -L/-R/-D could accept a string too long for our
jacob [Fri, 4 Mar 2005 01:54:56 +0000 (01:54 +0000)]
Fix potential fault where -L/-R/-D could accept a string too long for our
portfwd[] array. (Not sure what would happen in this case, mind.)
Also modify -L/-R/-D code to cope with IPv4/IPv6 tunnels in saved settings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5440 cda61777-01e9-0310-a592-d414129be87e

19 years agorm some magic numbers in ssh_setup_portfwd()
jacob [Fri, 4 Mar 2005 01:20:20 +0000 (01:20 +0000)]
rm some magic numbers in ssh_setup_portfwd()

git-svn-id: svn://svn.tartarus.org/sgt/putty@5439 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix minor imprecisions in cfg->portfwd[] bounds checking (which erred on the
jacob [Fri, 4 Mar 2005 01:02:53 +0000 (01:02 +0000)]
Fix minor imprecisions in cfg->portfwd[] bounds checking (which erred on the
side of rejecting input, not buffer overflow).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5438 cda61777-01e9-0310-a592-d414129be87e

19 years agoExplicitly set MIN and TIME when in raw mode to request single characters
ben [Thu, 3 Mar 2005 13:07:25 +0000 (13:07 +0000)]
Explicitly set MIN and TIME when in raw mode to request single characters
with no timeout.  This seems to make Plink work better on Solaris.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5436 cda61777-01e9-0310-a592-d414129be87e

19 years agoDraglists, implemented as up-down preference lists as in GTK.
owen [Wed, 2 Mar 2005 23:33:59 +0000 (23:33 +0000)]
Draglists, implemented as up-down preference lists as in GTK.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5434 cda61777-01e9-0310-a592-d414129be87e

19 years agoMore confusing "(BYTE *) & val" style punctuation.
jacob [Wed, 2 Mar 2005 15:53:50 +0000 (15:53 +0000)]
More confusing "(BYTE *) & val" style punctuation.
I blame GNU indent, although its confusion is understandable.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5432 cda61777-01e9-0310-a592-d414129be87e

19 years agonit: confusing punctuation
jacob [Wed, 2 Mar 2005 00:46:22 +0000 (00:46 +0000)]
nit: confusing punctuation

git-svn-id: svn://svn.tartarus.org/sgt/putty@5430 cda61777-01e9-0310-a592-d414129be87e

19 years agorm incorrect comment
jacob [Wed, 2 Mar 2005 00:31:33 +0000 (00:31 +0000)]
rm incorrect comment

git-svn-id: svn://svn.tartarus.org/sgt/putty@5429 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix off-by-one in memory management of PPK reading routine, which could cause
jacob [Tue, 1 Mar 2005 23:48:45 +0000 (23:48 +0000)]
Fix off-by-one in memory management of PPK reading routine, which could cause
1-byte buffer overflow when reading .PPK files with long lines (>=128 bytes
in header value -- probably only happened in practice in the comment field).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5427 cda61777-01e9-0310-a592-d414129be87e

19 years agoClose on exit. I'm not entirely happy with the distribution of this
owen [Tue, 1 Mar 2005 21:38:06 +0000 (21:38 +0000)]
Close on exit.  I'm not entirely happy with the distribution of this
across mac_closeterm() and notify_remote_exit() but it will do for now.
Also, "PuTTY (inactive)" looks strange as a Mac window title in a way it
doesn't on Unix or Windows.  Perhaps we should find another way of
indicating that a window contains a dead session?

git-svn-id: svn://svn.tartarus.org/sgt/putty@5424 cda61777-01e9-0310-a592-d414129be87e

19 years agoUpdate Inno Setup script. Tested with IS 5.0.8 on Win98SE; I think there are
jacob [Tue, 1 Mar 2005 21:34:21 +0000 (21:34 +0000)]
Update Inno Setup script. Tested with IS 5.0.8 on Win98SE; I think there are
a few things that will faze whatever we're using currently (2.0.19 or
thereabouts?), but nothing desperately modern. (NB, the 0.57 putty.iss works
fine with 5.0.8 and the installer is even 40k smaller.)

Notable changes:
 - Uninstallation now runs a variant of `putty -cleanup'. The variance is
   only in the text displayed; the user is still prompted, and the default
   action is (now) "keep" in both cases.
 - Optionally add an icon in the Quick Launch bar.
 - Make desktop item optionally for all users. (not tested)
 - "Create a Start Menu group" now handled via IS' own mechanism.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5423 cda61777-01e9-0310-a592-d414129be87e

19 years agoMention `-cleanup' caveats on multi-user systems.
jacob [Tue, 1 Mar 2005 15:18:34 +0000 (15:18 +0000)]
Mention `-cleanup' caveats on multi-user systems.
Mention installer in faq-cleanup.
Fix indexing snafu.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5422 cda61777-01e9-0310-a592-d414129be87e

19 years agoVC didn't like PATH_MAX. Use MAX_PATH instead. (This macro is mentioned in
jacob [Tue, 1 Mar 2005 12:19:58 +0000 (12:19 +0000)]
VC didn't like PATH_MAX. Use MAX_PATH instead. (This macro is mentioned in
MSDN's SetCurrentDirectory() documentation, although I haven't found a
statement of where it's supposed to be defined.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5420 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd context help to a couple of message boxes. Unfortunately the ones
jacob [Tue, 1 Mar 2005 01:16:57 +0000 (01:16 +0000)]
Add context help to a couple of message boxes. Unfortunately the ones
I wanted to get to -- "software caused connection abort" and friends --
are going to be more involved (probably requiring some cross-platform
notion of help contexts), and these ones hardly seem worth the effort.
Still, I've done it now.

Side-effect: Pageant now uses the same `hinst' and `hwnd' globals as
everything else. Tested basic functionality.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5417 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake it clearer that `-m' is only usable with SSH.
jacob [Tue, 1 Mar 2005 00:33:18 +0000 (00:33 +0000)]
Make it clearer that `-m' is only usable with SSH.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5416 cda61777-01e9-0310-a592-d414129be87e

19 years agoMove the MessageBox-with-help function out into winutils.c, although it's
jacob [Tue, 1 Mar 2005 00:00:09 +0000 (00:00 +0000)]
Move the MessageBox-with-help function out into winutils.c, although it's
still only used for the host key popups. Side-effects:
 - requested_help is a winstuff.h global
 - Pageant now defines winstuff.h globals

(Also, my previous fix to my improved host-key dialogs only got the "changed"
case, not the "unknown" case. Some days I shouldn't be let near a keyboard.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5415 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake things other than Pageant use request_file(), why not, although all of
jacob [Mon, 28 Feb 2005 02:51:51 +0000 (02:51 +0000)]
Make things other than Pageant use request_file(), why not, although all of
its funkiness is switched off so the behaviour is the same as before.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5414 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix for `pageant-dirhandle': a new wrapper functions `request_file()' maintains
jacob [Mon, 28 Feb 2005 02:40:43 +0000 (02:40 +0000)]
Fix for `pageant-dirhandle': a new wrapper functions `request_file()' maintains
a separate CWD for the file requester, so that when the Open File box is not
open Pageant should stay where it was started.
(Also some other minor cleanups in this area of Pageant.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5413 cda61777-01e9-0310-a592-d414129be87e

19 years agoPSFTP now needs wildcard.o, and was only getting it by luck. Make it explicit.
jacob [Mon, 28 Feb 2005 00:17:09 +0000 (00:17 +0000)]
PSFTP now needs wildcard.o, and was only getting it by luck. Make it explicit.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5411 cda61777-01e9-0310-a592-d414129be87e

19 years agoMove SaneDialogBox()/SaneEndDialog() from winmisc.c to windlg.c, since they
jacob [Sun, 27 Feb 2005 23:57:17 +0000 (23:57 +0000)]
Move SaneDialogBox()/SaneEndDialog() from winmisc.c to windlg.c, since they
seem to be PuTTY(tel)-specific (at least at the moment). Might save a bit
of space in the other binaries.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5410 cda61777-01e9-0310-a592-d414129be87e

19 years agoImprove Pageant's error reporting for private key load failures.
jacob [Sun, 27 Feb 2005 23:15:22 +0000 (23:15 +0000)]
Improve Pageant's error reporting for private key load failures.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5409 cda61777-01e9-0310-a592-d414129be87e

19 years agoImprovements to PuTTYgen error reporting:
jacob [Sun, 27 Feb 2005 23:01:11 +0000 (23:01 +0000)]
Improvements to PuTTYgen error reporting:
 - will now display a reason when it fails to load a key
 - uses existing error return from native keys
 - import.c had a lot of error descriptions which weren't going anywhere;
   since the strings are probably taking up space in the binary, we
   may as well use them

git-svn-id: svn://svn.tartarus.org/sgt/putty@5408 cda61777-01e9-0310-a592-d414129be87e

19 years agoWarn on close. Also warn before use.
owen [Sun, 27 Feb 2005 13:53:08 +0000 (13:53 +0000)]
Warn on close.  Also warn before use.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5407 cda61777-01e9-0310-a592-d414129be87e

19 years agoPull out the common compiler-specific workarounds and so on from individual
jacob [Sat, 26 Feb 2005 17:43:47 +0000 (17:43 +0000)]
Pull out the common compiler-specific workarounds and so on from individual
resource files into windows/rcstuff.h.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5405 cda61777-01e9-0310-a592-d414129be87e

19 years agoAllow mkfiles.pl to put multiple verbatim sections in a Makefile, and use
jacob [Sat, 26 Feb 2005 17:30:41 +0000 (17:30 +0000)]
Allow mkfiles.pl to put multiple verbatim sections in a Makefile, and use
one of these for the MacOSX CFLAGS tweak.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5404 cda61777-01e9-0310-a592-d414129be87e

19 years agoThe comment that Private-Hash: was not allowed in DSS PuTTY-User-Key-File-1
jacob [Sat, 26 Feb 2005 15:50:29 +0000 (15:50 +0000)]
The comment that Private-Hash: was not allowed in DSS PuTTY-User-Key-File-1
keys was apparently incorrect; prior to r1413, it was both allowed, and
generated for passphraseless keys. Remove it and associated validation so that
people are able to load such keys into PuTTYgen to upgrade them, as suggested.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5403 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix segfault on forcible window closure.
simon [Sat, 26 Feb 2005 15:13:13 +0000 (15:13 +0000)]
Fix segfault on forcible window closure.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5402 cda61777-01e9-0310-a592-d414129be87e

19 years agoSort out close-on-exit, connection_fatal(), fatalbox(), and
simon [Sat, 26 Feb 2005 13:37:07 +0000 (13:37 +0000)]
Sort out close-on-exit, connection_fatal(), fatalbox(), and
[SessionWindow dealloc] (which was required in order to avoid
segfaulting when a redraw timer fired for a closed session window!).

git-svn-id: svn://svn.tartarus.org/sgt/putty@5400 cda61777-01e9-0310-a592-d414129be87e

19 years agoWe weren't correctly discounting "." and ".." when they came from
jacob [Sat, 26 Feb 2005 00:41:36 +0000 (00:41 +0000)]
We weren't correctly discounting "." and ".." when they came from
FindFirstFile(), with hilarious consequences for recursive transfers in
PSFTP. (PSCP appears to behave fine; it does its own "."/".." removal.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5398 cda61777-01e9-0310-a592-d414129be87e

19 years agoMakefile.lcc mentions version.o instead of .obj (not that it matters, probably)
jacob [Fri, 25 Feb 2005 21:26:30 +0000 (21:26 +0000)]
Makefile.lcc mentions version.o instead of .obj (not that it matters, probably)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5397 cda61777-01e9-0310-a592-d414129be87e

19 years agoPer Gunnar Floe spotted a reversed test in sftp_cleanup_requests().
simon [Fri, 25 Feb 2005 09:59:24 +0000 (09:59 +0000)]
Per Gunnar Floe spotted a reversed test in sftp_cleanup_requests().

git-svn-id: svn://svn.tartarus.org/sgt/putty@5394 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd RT_MANIFEST arguments to dependencies for Windows resource objects.
jacob [Thu, 24 Feb 2005 22:45:50 +0000 (22:45 +0000)]
Add RT_MANIFEST arguments to dependencies for Windows resource objects.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5393 cda61777-01e9-0310-a592-d414129be87e

19 years agoSome copyright dates that were missed in the Mac port.
jacob [Thu, 24 Feb 2005 20:28:10 +0000 (20:28 +0000)]
Some copyright dates that were missed in the Mac port.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5392 cda61777-01e9-0310-a592-d414129be87e

19 years agoSupport for setting some options like keepalive, oobinline, nodelay, and
owen [Wed, 23 Feb 2005 21:19:53 +0000 (21:19 +0000)]
Support for setting some options like keepalive, oobinline, nodelay, and
SO_REUSEADDR for ot_newlistener().  Also handle remote-initiated
disconnections.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5388 cda61777-01e9-0310-a592-d414129be87e

19 years agoFallout from my change in the semantics of cfg.remote_cmd_ptr.
simon [Wed, 23 Feb 2005 09:25:39 +0000 (09:25 +0000)]
Fallout from my change in the semantics of cfg.remote_cmd_ptr.
Spotted by Alano na Alania.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5386 cda61777-01e9-0310-a592-d414129be87e

19 years agoA first attempt at listening sockets in Open Transport.
owen [Tue, 22 Feb 2005 23:40:47 +0000 (23:40 +0000)]
A first attempt at listening sockets in Open Transport.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5385 cda61777-01e9-0310-a592-d414129be87e

19 years agoRemove the two logevent calls passing NULL as the first argument.
simon [Tue, 22 Feb 2005 23:30:09 +0000 (23:30 +0000)]
Remove the two logevent calls passing NULL as the first argument.
This was copied straight from winnet.c and I don't believe it's
_ever_ been valid in the Unix front end.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5384 cda61777-01e9-0310-a592-d414129be87e

19 years agoRearrange verify_ssh_host_key() for robustness in the face of strangeness, in
jacob [Mon, 21 Feb 2005 23:43:49 +0000 (23:43 +0000)]
Rearrange verify_ssh_host_key() for robustness in the face of strangeness, in
the same manner as windows/windlg.c (but tested this time :)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5380 cda61777-01e9-0310-a592-d414129be87e

19 years agoAhem. Fix my hostkey dialog fix so that storing the host key doesn't
jacob [Mon, 21 Feb 2005 23:34:41 +0000 (23:34 +0000)]
Ahem. Fix my hostkey dialog fix so that storing the host key doesn't
close the connection.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5379 cda61777-01e9-0310-a592-d414129be87e

19 years agoMake sure that auth->xdmseen is initialised (to NULL) even if it's not used.
ben [Mon, 21 Feb 2005 18:13:51 +0000 (18:13 +0000)]
Make sure that auth->xdmseen is initialised (to NULL) even if it's not used.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5375 cda61777-01e9-0310-a592-d414129be87e

19 years agoChange "are you sure you want to close this window" default back to what it
jacob [Sun, 20 Feb 2005 23:26:47 +0000 (23:26 +0000)]
Change "are you sure you want to close this window" default back to what it
was ("yes"). Partly because it was inconsistent with gtkdlg.c, and partly
because it was annoying me.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5371 cda61777-01e9-0310-a592-d414129be87e

19 years agoOn Windows, MessageBoxIndirect() was sometimes failing to pop up the host key
jacob [Sun, 20 Feb 2005 23:00:17 +0000 (23:00 +0000)]
On Windows, MessageBoxIndirect() was sometimes failing to pop up the host key
dialog and returning an unexpected value (0), causing everything to silently
behave as if the user had said "allow this connection but don't store host
key"!

Initialising (MSGBOXPARAMS).hInstance seems to have cured this (although the
MSDN docs seemed to indicate it wouldn't be used) -- if so, it's been broken
since r5309 on 2004-02-15 -- but since this was something of a Heisenbug, and
the behaviour was so catastrophic when MessageBoxIndirect() behaved oddly, I've
rearranged the code to default to cancelling, and added an assertion for
visibility.

(Windows PuTTY still seems to be broken wrt servers that send NEWKEYS while
we're waiting for the user, which happens to include the "SSH-2.0-2.4.1 SSH
Secure Shell OpenVMS V1.0" I'm testing against. I don't know why. The above bug
may also have been limited to this circumstance.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5370 cda61777-01e9-0310-a592-d414129be87e

19 years agoAnother failure to crStop(0) on user abort, this time for SSH-1 cipher
jacob [Sun, 20 Feb 2005 21:00:16 +0000 (21:00 +0000)]
Another failure to crStop(0) on user abort, this time for SSH-1 cipher
askalg(). That should be the last one.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5369 cda61777-01e9-0310-a592-d414129be87e

19 years agoSupport the drop-down menu part of the editbox control (combobox). This
owen [Sun, 20 Feb 2005 12:54:10 +0000 (12:54 +0000)]
Support the drop-down menu part of the editbox control (combobox).  This
cuts and pastes a lot of code from macctrl_popup, which perhaps should be
consolidated.  Also change the effective line codepage when it is changed
with Change Settings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5363 cda61777-01e9-0310-a592-d414129be87e

19 years agoREADME.txt needs CRLF line endings.
simon [Sun, 20 Feb 2005 11:34:46 +0000 (11:34 +0000)]
README.txt needs CRLF line endings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5362 cda61777-01e9-0310-a592-d414129be87e

19 years agoBump version numbers. (Forgot to do this _before_ dropping the 0.57
simon [Sun, 20 Feb 2005 10:51:02 +0000 (10:51 +0000)]
Bump version numbers. (Forgot to do this _before_ dropping the 0.57
tag, but that's OK because SVN doesn't distinguish tags from
branches anyway...)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5361 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdditional robustness to SFTP packet parsing and memory allocation.
simon [Sun, 20 Feb 2005 10:30:05 +0000 (10:30 +0000)]
Additional robustness to SFTP packet parsing and memory allocation.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5358 cda61777-01e9-0310-a592-d414129be87e

19 years agoCorrect some comments based on feedback from Thomas Dickey.
ben [Sat, 19 Feb 2005 21:56:25 +0000 (21:56 +0000)]
Correct some comments based on feedback from Thomas Dickey.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5356 cda61777-01e9-0310-a592-d414129be87e

19 years agoGrey the titles of group boxes when the config box is not frontmost.
owen [Sat, 19 Feb 2005 15:53:26 +0000 (15:53 +0000)]
Grey the titles of group boxes when the config box is not frontmost.
Edit box values still fail to be greyed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5355 cda61777-01e9-0310-a592-d414129be87e

19 years agoOops; missed out a crStop in the new host key verification code.
simon [Sat, 19 Feb 2005 14:48:36 +0000 (14:48 +0000)]
Oops; missed out a crStop in the new host key verification code.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5354 cda61777-01e9-0310-a592-d414129be87e

19 years agoLog file open mode lost a "b" in r5344. Windows at least needs log files to
jacob [Sat, 19 Feb 2005 01:20:16 +0000 (01:20 +0000)]
Log file open mode lost a "b" in r5344. Windows at least needs log files to
be written in binary mode with the current code.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5353 cda61777-01e9-0310-a592-d414129be87e

19 years agoNew enum constant ERROR clashed with a macro in MinGW's wingdi.h.
jacob [Fri, 18 Feb 2005 22:03:15 +0000 (22:03 +0000)]
New enum constant ERROR clashed with a macro in MinGW's wingdi.h.
Use uglier names.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5352 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd plain-Unix binaries to the `make clean' list in the OS X makefile.
simon [Fri, 18 Feb 2005 18:35:30 +0000 (18:35 +0000)]
Add plain-Unix binaries to the `make clean' list in the OS X makefile.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5345 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdd asynchronous callback capability to the askappend() alert box.
simon [Fri, 18 Feb 2005 18:33:31 +0000 (18:33 +0000)]
Add asynchronous callback capability to the askappend() alert box.
This was harder than verify_ssh_host_key() and askalg() put
together, because:
 (a) askappend() can be called at any time, since it's a side effect
     of data-logging functions. Therefore there can be an unfinished
     askappend() alert at any time, and hence the OS X front end has
     to be prepared to _queue_ other alerts which occur during that
     time.
 (b) logging.c has to do something with data that comes in while
     it's waiting for an answer to askappend(). It buffers it until
     it knows what the user wants done with it. This involved
     something of a reorganisation of logging.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5344 cda61777-01e9-0310-a592-d414129be87e

19 years agoA few more fixes in the new asynchronous-alert-box mechanism.
simon [Fri, 18 Feb 2005 18:19:28 +0000 (18:19 +0000)]
A few more fixes in the new asynchronous-alert-box mechanism.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5343 cda61777-01e9-0310-a592-d414129be87e

19 years agoWe have a host key database, just not a very good one.
owen [Fri, 18 Feb 2005 09:22:55 +0000 (09:22 +0000)]
We have a host key database, just not a very good one.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5340 cda61777-01e9-0310-a592-d414129be87e

19 years agoAdjust the semantics of cfg.remote_cmd_ptr: it is now NULL when
simon [Thu, 17 Feb 2005 19:31:32 +0000 (19:31 +0000)]
Adjust the semantics of cfg.remote_cmd_ptr: it is now NULL when
cfg.remote_cmd is to be used, rather than actually pointing at
cfg.remote_cmd. This change restores the ability to structure-copy
Configs without breaking them. (Though of course this is only a
temporary solution: really what wants doing is to fix
`config-struct'.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@5335 cda61777-01e9-0310-a592-d414129be87e

19 years agoAhem. Actually _checking_ that asynchronous askalg() worked would
simon [Thu, 17 Feb 2005 18:56:37 +0000 (18:56 +0000)]
Ahem. Actually _checking_ that asynchronous askalg() worked would
have been helpful. Since async verify_ssh_host_key() worked, I
didn't think anything else could go wrong. How wrong I was.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5331 cda61777-01e9-0310-a592-d414129be87e

19 years agoRevamp interface to verify_ssh_host_key() and askalg(). Each of them
simon [Thu, 17 Feb 2005 18:34:24 +0000 (18:34 +0000)]
Revamp interface to verify_ssh_host_key() and askalg(). Each of them
now returns an integer: 0 means cancel the SSH connection and 1
means continue with it. Additionally, they can return -1, which
means `front end has set an asynchronous alert box in motion, please
wait to be called back with the result', and each one is passed a
callback function pointer and context for this purpose.

I have not yet done the same to askappend() yet, because it will
take a certain amount of reorganisation of logging.c.

Importantly, this checkin means the host key dialog box now works on
OS X.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5330 cda61777-01e9-0310-a592-d414129be87e

19 years agossh_do_close() should close any listening sockets associated with
jacob [Thu, 17 Feb 2005 02:00:01 +0000 (02:00 +0000)]
ssh_do_close() should close any listening sockets associated with
port-forwardings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5325 cda61777-01e9-0310-a592-d414129be87e

19 years agossh_do_close() was only closing about half the channels. Fixed.
jacob [Thu, 17 Feb 2005 01:47:01 +0000 (01:47 +0000)]
ssh_do_close() was only closing about half the channels. Fixed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5324 cda61777-01e9-0310-a592-d414129be87e

19 years agoOn the Mac, support for setting the line codepage and for combining
owen [Wed, 16 Feb 2005 23:30:10 +0000 (23:30 +0000)]
On the Mac, support for setting the line codepage and for combining
characters.  I've just used libcharset in macucs.c since there seemed
little reason not to, and implemented combining characters by naive
overprinting.  It's not yet a lot of use without the ability to select
a font, of course.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5322 cda61777-01e9-0310-a592-d414129be87e

19 years agoportfwd validation was sometimes not picking up a blank source port
jacob [Wed, 16 Feb 2005 12:13:27 +0000 (12:13 +0000)]
portfwd validation was sometimes not picking up a blank source port

git-svn-id: svn://svn.tartarus.org/sgt/putty@5319 cda61777-01e9-0310-a592-d414129be87e

19 years agoFix a minor valgrind issue in dynamic port-forwarding.
jacob [Wed, 16 Feb 2005 11:56:27 +0000 (11:56 +0000)]
Fix a minor valgrind issue in dynamic port-forwarding.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5318 cda61777-01e9-0310-a592-d414129be87e