Jacob Nevins [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.
Jacob Nevins [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.)
Jacob Nevins [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.)
Jacob Nevins [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.
Jacob Nevins [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
Jacob Nevins [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.
Simon Tatham [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!).
Jacob Nevins [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.)
Owen Dunn [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.
Simon Tatham [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.
Jacob Nevins [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.
Jacob Nevins [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.)
Owen Dunn [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.
Simon Tatham [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.
Simon Tatham [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'.)
Simon Tatham [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.
Simon Tatham [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.
Owen Dunn [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.
Jacob Nevins [Wed, 16 Feb 2005 11:44:44 +0000 (11:44 +0000)]
Simon suggests a better solution to valgrind's complaining about
(struct Socket_tag).connected -- it should be entirely irrelevant to
listening sockets. Valgrind is still happy.
Owen Dunn [Tue, 15 Feb 2005 22:41:00 +0000 (22:41 +0000)]
Grouping boxes for the configuration dialogue. The System 7 version is
completely untested so far, but the Appearance Manager version works and
looks plausible. There are still some HI Guideline spacing issues to
address.
Jacob Nevins [Tue, 15 Feb 2005 22:23:47 +0000 (22:23 +0000)]
The Windows host key dialogs now have a `Help' button that should give
appropriate context help, iff the help file is present. (Shame it's prey to
`winhelp-crash'.)
(I've perpetrated a widening of visibility of `hwnd'; the alternative, putting
it into a frontend handle, seemed too likely to cause maintenance trouble if
we don't also _use_ that frontend handle everywhere we now use the global
`hwnd'.)
Simon Tatham [Tue, 15 Feb 2005 21:45:50 +0000 (21:45 +0000)]
Initial checkin of a native Mac OS X port, sharing most of its code
with the Unix port and layering a Cocoa GUI on top. The basics all
work: there's a configuration panel and a terminal window, the
timing interface works and the select interface functions. The same
application can run both SSH (or other network) connections and
local pty sessions, and multiple sessions in the same process are
fully supported.
However, it's horribly unfinished in a wide variety of other ways;
anyone interested is invited to read README.OSX and wince at the
length and content of its `unfinished' list.
Jacob Nevins [Tue, 15 Feb 2005 17:05:58 +0000 (17:05 +0000)]
The terminal window can now indicate that PuTTY is busy in various ways, by
changing its mouse pointer. Currently this is only used in the (slightly-
arbitrarily-defined) "heavy" bits of SSH-2 key exchange. We override pointer
hiding while PuTTY is busy, but preserve pointer-hiding state.
Not yet implemented on the Mac.
Also switch to frobbing window-class cursor in Windows rather than relying on
SetCursor().
Jacob Nevins [Tue, 15 Feb 2005 12:35:59 +0000 (12:35 +0000)]
Extra note on "connection reset by peer" on Windows.
Note default circumstances of cipher warning. (I haven't bothered with the
similar kex warning since it doesn't come up in the default configuration,
and is in any case unlikely to be common.)
Jacob Nevins [Mon, 14 Feb 2005 11:43:27 +0000 (11:43 +0000)]
Martin Prikryl points out that we weren't always initialising new "addrinfo"
members of Windows SockAddr_tag; particular in sk_nonamelookup() (proxy
resolution at far end) this was causing trouble.
Make sure they _always_ start out NULL (since the Windows getaddrinfo()
documentation doesn't make any claims about initialisation), and also
initialise 'naddresses' in sk_nonamelookup() for good measure.
Simon Tatham [Mon, 14 Feb 2005 07:41:41 +0000 (07:41 +0000)]
Saw uxcfg.c in half down the middle, to separate out config changes
that apply to all Unix-like systems from those which apply
specifically to the GTK front end.
Owen Dunn [Wed, 9 Feb 2005 21:18:44 +0000 (21:18 +0000)]
Add some host key dialogue boxes. These still look a little rough around
the edges and need to have all their controls properly aligned and spaced
according to the HI guidelines. Also, fix store_host_key() so that it
replaces a host key correctly when the host key has changed and the user
opts to update the cached one.
Simon Tatham [Wed, 9 Feb 2005 15:57:07 +0000 (15:57 +0000)]
Improve documentation of the SCP wildcard safety issue: in
particular, mention that doing an SCP wildcard download into a clean
directory is adequate protection against a malicious server trying
to overwrite your files.
Simon Tatham [Mon, 7 Feb 2005 20:24:13 +0000 (20:24 +0000)]
Revert my LF->CR change following Owen's comment that it actually
breaks netatalk-based setups (which _swap_ LF and CR). Instead,
setfile.sh (which I have to run _anyway_ on OS X) copies mkputty.mpw
to mk.mpw and then makes that CR-based.
Simon Tatham [Sun, 6 Feb 2005 15:52:00 +0000 (15:52 +0000)]
Reinstate the broken -e option in pterm. Also I've just worked out a
much better way of handling pty_argv which doesn't require uxpty.c
to be linked in to Unix PuTTY and PuTTYtel.
Simon Tatham [Sun, 6 Feb 2005 15:14:34 +0000 (15:14 +0000)]
Encapsulated most of the pty backend's variables into a proper data
structure, in preparation for wanting more than one of them in a
single process. This can't be done cleanly, because the whole
business with pty_pre_init pre-allocating the pty rather assumes we
want a known number of the things before we drop privileges; so
there's a horrid hack to make pty_pre_init work on platforms that
have at most one pty instance per process, but at the same time
things ought to work sensibly with more than one per process _if_
pty_pre_init isn't required.
Simon Tatham [Sat, 5 Feb 2005 15:33:36 +0000 (15:33 +0000)]
When allocating BSD-style ptys, we should not be satisfied with a
/dev/ptyXX we can open: we must also check that we can open and use
the corresponding /dev/ttyXX, because if it's been left in the wrong
mode then we will look terribly silly when we fork and _then_
discover our pty is unusable.
Owen Dunn [Sat, 5 Feb 2005 14:50:42 +0000 (14:50 +0000)]
Implement refreshing the whole dialogue box with dlg_refresh, so that
if you load a session all the panels in the configuration dialogue
reflect the new settings. However, there's a glitch which paints a white
rectangle between the Saved Sessions listbox and the Close-on-exit radios.
Simon Tatham [Sat, 5 Feb 2005 10:55:09 +0000 (10:55 +0000)]
Mac PuTTY.ppc wouldn't compile for me until I added this prototype.
Not sure why it's been working for Owen and not me, but the
prototype ought to be there anyway, so *shrug*.
Ben Harris [Wed, 2 Feb 2005 23:51:58 +0000 (23:51 +0000)]
Implement anti-replay protection for XDM-AUTHORIZATION-1, as required by
the specification. We keep a cache of tickets we've seen recently and
reject duplicates. Once a ticket in our cache is old enough that we
wouldn't accept a duplicate anyway, we expire it.