Граф коммитов

118 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham a37d43069d Move cipher settings into their own config panel.
This makes room in the main SSH panel for new options about connection
sharing, which I'm shortly going to add.

[originally from svn r10063]
2013-11-17 14:03:25 +00:00
Simon Tatham 597cbddbb9 Fix handling of IPv6 dynamic forwardings.
During the Conf revamp, I changed the internal representation of
dynamic forwardings so that they were stored as the conceptually
sensible L12345=D rather than the old D12345, and added compensation
code to translate to the latter form for backwards-compatible data
storage and for OpenSSH-harmonised GUI display. Unfortunately I forgot
that keys in the forwarding data can also prefix the L/R with a
character indicating IPv4/IPv6, and my translations didn't take
account of that possibility. Fix them.

[originally from svn r10031]
2013-08-22 17:45:26 +00:00
Simon Tatham 3692a585f7 Remove a pointless assignment in setup_config_box.
[originally from svn r9925]
2013-07-14 10:46:42 +00:00
Simon Tatham 7554dd5a9c Use the new ctrl_alloc_with_free to clean up a long-standing FIXME in
the session saving code, in which the contents of the edit box giving
the current saved session name was stored in a horrid place with a
fixed length. Now it's dangling off sessionsaver_data as it always
ought to have been, and it's dynamically reallocated to the
appropriate length, and there's a free function that cleans it up at
the end of the dialog's lifetime.

[originally from svn r9923]
2013-07-14 10:46:34 +00:00
Simon Tatham 71f0c7546d Add a bug-compatibility flag to disable the
winadj@putty.projects.tartarus.org request. Not currently enabled
automatically, but should be usable as a manual workaround.

[originally from svn r9592]
2012-07-28 19:30:12 +00:00
Simon Tatham 0b8753a4b9 Fix an embarrassing mistake in config box handling which was causing
changes to any SSH bug config option to be lost when the config box
switched to a different panel, at least on GTK.

[originally from svn r9591]
2012-07-28 16:53:09 +00:00
Simon Tatham afa871e3cf Remove an unused variable.
[originally from svn r9589]
2012-07-28 16:33:17 +00:00
Simon Tatham bc6e0952ef Introduce a third setting for the 'bold as colour' mode, which lets
you both brighten the colour _and_ bold the font at the same time.
(Fixes 'bold-font-colour' and Debian #193352.)

[originally from svn r9559]
2012-06-09 15:09:22 +00:00
Simon Tatham 63cb9c8356 Fallout from the big revamp in r9214: colour handling was going a bit
wonky because I'd used the subkey for the red component in four places
where I should have used the green/blue subkeys instead. Thanks to
Martin Kletzander for spotting it.

[originally from svn r9449]
[r9214 == a1f3b7a358]
2012-04-08 09:42:58 +00:00
Simon Tatham 62cbc7dc0b Turn 'Filename' into a dynamically allocated type with no arbitrary
length limit, just as I did to FontSpec yesterday.

[originally from svn r9316]
2011-10-02 11:01:57 +00:00
Simon Tatham 9c75fe9a3f Change the semantics of 'FontSpec' so that it's a dynamically
allocated type.

The main reason for this is to stop it from taking up a fixed large
amount of space in every 'struct value' subunion in conf.c, although
that makes little difference so far because Filename is still doing
the same thing (and is therefore next on my list). However, the
removal of its arbitrary length limit is not to be sneezed at.

[originally from svn r9314]
2011-10-01 17:38:59 +00:00
Simon Tatham a1f3b7a358 Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.

User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).

One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.

[originally from svn r9214]
2011-07-14 18:52:21 +00:00
Jacob Nevins b570f28224 Tweak to r7635: when changing between protocols in the configuration dialog
and avoiding trashing a non-default port, don't treat a port of 0 as special;
this was causing defaults to "freeze in" for sequences of clicks like SSH,
Raw, Telnet.
Arrange that a port of 0 (which in a backend indicates no default) is displayed
as a blank in the port box, to make this less jarring.

[originally from svn r9077]
[r7635 == db7cc1cba6]
2011-01-14 19:57:00 +00:00
Jacob Nevins af1060856e Add an option to disable SSH-2 banners.
[originally from svn r9055]
2010-12-27 01:19:13 +00:00
Jacob Nevins 942ac83108 Bah, r9008 caused an assertion failure on Windows due to a clash with the
shortcuts for the preference list buttons. That'll teach me to only test the
Gtk version.

[originally from svn r9010]
[r9008 == 5981b5e99d]
2010-09-27 11:33:40 +00:00
Jacob Nevins 5981b5e99d Since GSSAPI is now on its own panel, we may as well have a full set of
keyboard shortcuts.

[originally from svn r9008]
2010-09-25 15:51:14 +00:00
Simon Tatham 406e62f77b Cleanups of the GSSAPI support. On Windows, standard GSS libraries
are now loaded from standard locations (system32 for SSPI, the
registry-stored MIT KfW install location for KfW) rather than using
the risky default DLL search path; I've therefore also added an
option to manually specify a GSS DLL we haven't heard of (which
should in principle Just Work provided it supports proper GSS-API as
specified in the RFC). The same option exists on Unix too, because
it seemed like too useful an idea to reserve to Windows. In
addition, GSSAPI is now documented, and also (unfortunately) its GUI
configuration has been moved out into a sub-subpanel on the grounds
that it was too big to fit in Auth.

[originally from svn r9003]
2010-09-25 07:16:56 +00:00
Simon Tatham 99fffd6ed3 Patch from Alejandro Sedeno, somewhat modified by me, which
reorganises the GSSAPI support so that it handles alternative
implementations of the GSS-API. In particular, this means PuTTY can
now talk to MIT Kerberos for Windows instead of being limited to
SSPI. I don't know for sure whether further tweaking will be needed
(to the UI, most likely, or to automatic selection of credentials),
but testing reports suggest it's now at least worth committing to
trunk to get it more widely tested.

[originally from svn r8952]
2010-05-19 18:22:17 +00:00
Simon Tatham d5aa23c116 New SSH bug flag, for 'can't handle SSH2_MSG_IGNORE'. Another user
today reported an SSH2_MSG_UNIMPLEMENTED from a Cisco router which
looks as if it was triggered by SSH2_MSG_IGNORE, so I'm
experimentally putting this flag in. Currently must be manually
enabled, though if it turns out to solve the user's problem then
I'll probably add at least one version string...

[Edited commit message: actually, I also committed in error a piece
of experimental code as part of this checkin. Serve me right for not
running 'svn diff' first.]

[originally from svn r8926]
2010-04-23 18:32:15 +00:00
Jacob Nevins c18b150623 When looking for a local username on Windows, if we can get hold of the
NameUserPrincipal, use that; this avoids an issue with SSPI/GSSAPI where
the user logged in to the local machine with a different case of username
to the (case-sensitive) Kerberos username. Falls back to GetUserName as
before if that doesn't work (for machines not on a domain, and Win9x).
Based on a patch by SebastianUnger.

[originally from svn r8909]
2010-03-24 20:12:25 +00:00
Jacob Nevins 269979809e Add a keyboard shortcut for the "serial" protocol to the GUI.
Will cause non-zero, but hopefully acceptable, disruption to people's finger
macros.

[originally from svn r8749]
2009-11-13 13:24:32 +00:00
Jacob Nevins ace6564954 Attempt to filter out duplicate port forwardings in the GUI.
[originally from svn r8624]
2009-08-18 23:51:49 +00:00
Simon Tatham b024b57644 Clearing and refilling the code-pages list box can cause a
re-entrant call to its handler in config.c, which destroys the
previous value in cfg->line_codepage. Therefore, preserve the right
value in an automatic variable until all the re-entrant calls have
finished.

[originally from svn r8592]
2009-06-10 17:42:15 +00:00
Jacob Nevins 01a7673ae9 Fixed a PuTTYtel startup assertion failure introduced in r8305.
While I'm here, a cosmetic PuTTYtel change: remove a reference to SSH from the
"logical host name" label in PuTTYtel only.

[originally from svn r8331]
[r8305 == ca6fc3a4da]
2008-11-25 18:43:52 +00:00
Jacob Nevins dc896b79af New option to allow use of the local OS username for login to the remote side
if we have no better ideas, with UI shamelessly stolen from Quest PuTTY.

Off by default, which effectively reverts the change to using the local
username by default that came in with GSSAPI support in r8138. Anyone wanting
seamless single sign-on will need to set the new option. (The previous
default behaviour was getting in the way in ad-hoc scenarios.)

Note that the PSCP and Unix-Plink behaviour of using the local username by
default have remained unchanged throughout; they are not affected by the new
option. Not sure if that's the Right Thing.

[originally from svn r8324]
[r8138 == de5dd9d65c]
2008-11-24 17:51:42 +00:00
Jacob Nevins 02f7ccbb96 Rejig the Translation panel controls and documentation to remove the emphasis
on received data. Experiment and suggestion suggest that the character set
configuration applies equally to keystrokes sent to the server, or at least
that that's close enough to being true that we should document it as a first
approximation.

[originally from svn r8209]
2008-10-13 22:34:57 +00:00
Owen Dunn de5dd9d65c Initial commit of GSSAPI Kerberos support.
[originally from svn r8138]
2008-08-10 13:10:31 +00:00
Simon Tatham 853361c5b0 At least one version of gcc won't figure out that "clear" is never
read uninitialised (because the only circumstance under which it
isn't initialised is when "update" is FALSE, in which case it isn't
read either). Placate it.

[originally from svn r8119]
2008-07-17 17:01:27 +00:00
Jacob Nevins 6e447b9f18 Exorcise beeps from the Colours pane in Gtk.
The colour list box beeped at the user whenever it found that
something other than exactly one colour was selected. This seems to
happen implicitly in Gtk when the pane is changed. In Gtk1, this gave
you a beep whenever you left the Colours dialog after having selected
a colour from the list; in Gtk2, you additionally got a beep _every_
time you subsequently re-entered the Colours dialog (for reasons I
haven't investigated). Windows was unaffected.

Also, in Gtk (unlike Windows), it's possible for the user to go back
to the state where no items in the list box are selected at all.

For these reasons, stop beeping at the user, and instead blank the RGB
edit boxes as a hint that edits to them would be futile. (Really we
should be disabling them entirely, but the cross-platform edit
controls aren't up to that yet.)

[originally from svn r8074]
2008-06-15 12:39:09 +00:00
Simon Tatham e81a8cf795 Been meaning to do this for years: introduce a configuration option
to manually tweak the host name and port number under which the SSH
host key is read and written.

I've put it in the cross-platform Connection panel. Partly under the
flimsy pretext that other backends _can_ use it if they so wish (and
in fact it overrides the host name for title-bar purposes in all
network backends, though it has no other effect in anything but
SSH); but mostly because the SSH panel was too full already :-)

[originally from svn r8033]
2008-06-01 11:16:32 +00:00
Ben Harris 1940b37ff0 Add a new bug-compatibility mode that limits the window size we'll
advertise so that the server can't exceed our maximum packet size.
Enable it for "1.36_sshlib GlobalSCAPE" which apparently sends oversize
packets otherwise.

[originally from svn r7804]
2007-12-05 00:02:06 +00:00
Ben Harris 2323cb947e Avoid "unused variable" warning when NO_IPV6 defined.
[originally from svn r7710]
2007-09-03 20:52:56 +00:00
Ben Harris 8659f5145f "CR implies LF" patch, based on one from Paul Coldrey.
[originally from svn r7669]
2007-08-04 19:16:46 +00:00
Jacob Nevins db7cc1cba6 Implement Marcin Bulandra's suggestion of only automatically updating the
port number in the GUI when the connection type is changed if the current
port number is the standard one for the current protocol.
It's not perfect, but it should make the common case of tabbing through the
Session panel easier when starting non-SSH connections on odd ports.

[originally from svn r7635]
2007-07-01 15:47:31 +00:00
Jacob Nevins 46c00b0f38 Rationalise access to, and content of, backends[] array.
Should be no significant change in behaviour.
(Well, entering usernames containing commas on Plink's command line will be
a little harder now.)

[originally from svn r7628]
2007-06-30 21:56:44 +00:00
Ben Harris dad558a1e5 Add support for RFC 4432 RSA key exchange, the patch for which has been
lying around in my home directory for _years_.

[originally from svn r7496]
2007-04-30 22:09:26 +00:00
Jacob Nevins 0407960951 In controls where a list of entries is manipulated by Add/Remove buttons
(SSH tunnels, TTY modes, and environment variables), when the Remove button is
pressed, populate the edit controls from the entry that has just been deleted.

Several users have requested this, as it makes editing an entry easier (read-
modify-write) in the cases where order is unimportant, and also provides a
degree of undo-ability.

[originally from svn r7298]
2007-02-18 19:56:16 +00:00
Simon Tatham 856ed4ae73 Since we're now able to cope with Default Settings describing a
launchable session without getting confused by it, we can relax the
restriction on storing a host name in DS, which has attracted a
steady stream of complaints over the past six or seven years.

[originally from svn r7266]
2007-02-10 17:12:06 +00:00
Simon Tatham 5d76e00dac Avoid launching a session from the Default Settings, even if they do
represent a launchable session, unless the user can be construed to
have really meant it. This means:
 - starting up PuTTY when the Default Settings are launchable still
   brings up the config box, and you have to hit Open to actually
   launch that session
 - double-clicking on Default Settings from the config box will load
   them but not launch them.
On the other hand:
 - explicitly loading the Default Settings on the command line using
   `-load' _does_ still launch them.

[originally from svn r7265]
2007-02-10 17:02:41 +00:00
Jacob Nevins 0f366c32bb Swap order of `Columns' and `Rows' in the config dialog, to make it
consistent with sizetip.c (and more nebulous conventions).

[originally from svn r7196]
2007-02-01 23:24:30 +00:00
Jacob Nevins 726def0881 Various SSH-related things were appearing in the PuTTYtel configuration dialog,
probably since the addition of the serial backend. Use a more robust check for
SSH support.

[originally from svn r7088]
2007-01-10 00:16:53 +00:00
Jacob Nevins 4ae926fa8a Patch inspired by one from Daniel Silverstone in Debian bug #229232:
We now have an option where a remote window title query returns a well-formed
response containing the empty string. This should keep stop any server-side
application that was expecting a response from hanging, while not permitting
the response to be influenced by an attacker.

We also retain the ability to stay schtum. The existing checkbox has thus
grown into a set of radio buttons.

I've changed the default to the "empty string" response, even in the backward-
compatibility mode of loading old settings, which is a change in behaviour;
any users who want the old behaviour back will have to explicitly select it. I
think this is probably the Right Thing. (The only drawback I can think of is
that an attacker could still potentially use the relevant fixed strings for
mischief, but we already have other, similar reports.)

[originally from svn r7043]
2006-12-31 15:33:33 +00:00
Simon Tatham 8b11c26c57 New logging mode, which records the exact bytes sent over the wire
in an SSH connection _in addition_ to the decrypted packets. This
will hopefully come in useful for debugging wire data corruption
issues: you can strace the server, enable this mode in the client,
and compare the sent and received data.

I'd _like_ to have this mode also log Diffie-Hellman private
exponents, session IDs, encryption and MAC keys, so that the
resulting log file could be used to independently verify the
correctness of all cryptographic operations performed by PuTTY.
However, I haven't been able to convince myself that the security
implications are acceptable. (It doesn't matter that this
information would permit an attacker to decrypt the session, because
the _already_ decrypted session is stored alongside it in the log
file. And I'm not planning, under any circumstances, to log users'
private keys. But gaining access to the log file while the session
was still running would permit an attacker to _hijack_ the session,
and that's the iffy bit.)

[originally from svn r6835]
2006-08-29 19:07:11 +00:00
Simon Tatham 34f747421d Support for Windows PuTTY connecting straight to a local serial port
in place of making a network connection. This has involved a couple
of minor infrastructure changes:
 - New dlg_label_change() function in the dialog.h interface, which
   alters the label on a control. Only used, at present, to switch
   the Host Name and Port boxes into Serial Line and Speed, which
   means that any platform not implementing serial connections (i.e.
   currently all but Windows) does not need to actually do anything
   in this function. Yet.
 - New small piece of infrastructure: cfg_launchable() determines
   whether a Config structure describes a session ready to be
   launched. This was previously determined by seeing if it had a
   non-empty host name, but it has to check the serial line as well
   so there's a centralised function for it. I haven't gone through
   all front ends and arranged for this function to be used
   everywhere it needs to be; so far I've only checked Windows.
 - Similarly, cfg_dest() returns the destination of a connection
   (host name or serial line) in a text format suitable for putting
   into messages such as `Unable to connect to %s'.

[originally from svn r6815]
2006-08-28 10:35:12 +00:00
Jacob Nevins f8f21619c2 In the config dialog, clip RGB values to [0..255] rather than reducing them
mod 256.
Document that the RGB values can be edited, and their range.

[originally from svn r6734]
2006-06-20 21:10:33 +00:00
Simon Tatham c2b2d9c539 Introduce a new checkbox and command-line option to inhibit use of
Pageant for local authentication. (This is a `don't use Pageant for
authentication at session startup' button rather than a `pretend
Pageant doesn't exist' button: that is, agent forwarding is
independent of this option.)

[originally from svn r6572]
2006-02-19 12:05:12 +00:00
Owen Dunn 5408f0a545 Platform-independent support for zooming around session list by typing
in the session name box.  Thwarted on Unix by GTK not automatically
scrolling the listbox to the selected item, but we can fix that in
the platform-specific side later.

[originally from svn r6337]
2005-09-21 14:53:32 +00:00
Jacob Nevins b099456c87 Implement `bypass-ssh2-userauth', since from correspondence it sounds like
there are servers which could in principle operate in this mode, although I
don't know if any do in practice. (Hence, I haven't been able to test it.)

[originally from svn r5748]
[this svn revision also touched putty-wishlist]
2005-05-05 22:37:54 +00:00
Jacob Nevins fb581ac625 First crack at `terminal-modes' in SSH. PuTTY now sends ERASE by default,
Unix Plink sends everything sensible it can find, and it's fully configurable
from the GUI.

I'm not entirely sure about the precise set of modes that Unix Plink should
look at; informed tweaks are welcome.

Also the Mac bits are guesses (but trivial).

[originally from svn r5653]
[this svn revision also touched putty-wishlist]
2005-04-21 13:57:08 +00:00
Ben Harris 09951c6078 Implement my experimental arcfour modes. The 256-bit version is disabled
until I can test it against someone else's implementation.

[originally from svn r5633]
2005-04-14 22:58:29 +00:00