]> asedeno.scripts.mit.edu Git - PuTTY.git/log
PuTTY.git
13 years agoCleanups of the GSSAPI support. On Windows, standard GSS libraries
Simon Tatham [Sat, 25 Sep 2010 07:16:56 +0000 (07:16 +0000)]
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]

13 years agoUse the same key for both saving and loading the GSSAPI implementation
Jacob Nevins [Wed, 15 Sep 2010 18:50:34 +0000 (18:50 +0000)]
Use the same key for both saving and loading the GSSAPI implementation
preference list. Spotted by Daniel Kessler.

[originally from svn r8999]

13 years agoFix obvious braino in the Windows GSSAPI library display names.
Simon Tatham [Mon, 13 Sep 2010 08:45:18 +0000 (08:45 +0000)]
Fix obvious braino in the Windows GSSAPI library display names.

[originally from svn r8994]

13 years agoCreate, and use for all loads of system DLLs, a wrapper function
Simon Tatham [Mon, 13 Sep 2010 08:29:45 +0000 (08:29 +0000)]
Create, and use for all loads of system DLLs, a wrapper function
called load_system32_dll() which constructs a full pathname for the
DLL using GetSystemDirectory.

The only DLL load not covered by this change is the one for
gssapi32.dll, because that one's not in the system32 directory.

[originally from svn r8993]

13 years agoMissing close() causing resource leak when reading from /dev/random.
Simon Tatham [Thu, 9 Sep 2010 14:36:46 +0000 (14:36 +0000)]
Missing close() causing resource leak when reading from /dev/random.

[originally from svn r8991]

13 years agoRemove redundant check for NULL in sshfwd_close(). The thing we're
Simon Tatham [Thu, 9 Sep 2010 14:35:16 +0000 (14:35 +0000)]
Remove redundant check for NULL in sshfwd_close(). The thing we're
testing against NULL has already been dereferenced by the time we
bother to test it, so it's a bit pointless - and in any case, no
null pointer can come to this function from any existing call site.

[originally from svn r8990]

13 years agoCast incoming characters to unsigned char to avoid accidental sign
Simon Tatham [Thu, 9 Sep 2010 14:32:25 +0000 (14:32 +0000)]
Cast incoming characters to unsigned char to avoid accidental sign
extension. Since ldisc_send() uses bit 8 as an internal flag, we
shouldn't be setting it except when we really want to.

[originally from svn r8989]

13 years agoWhen we disconnect because we have no supported authentication
Simon Tatham [Tue, 10 Aug 2010 18:45:51 +0000 (18:45 +0000)]
When we disconnect because we have no supported authentication
methods left to try, it's nice to have the version of that message
going to the client contain the list of methods sent by the server.
Saves a user having to pull it out of an SSH packet log.

[originally from svn r8981]

13 years agoMass correction of svn:keywords and svn:eol-style properties.
Simon Tatham [Tue, 10 Aug 2010 17:21:25 +0000 (17:21 +0000)]
Mass correction of svn:keywords and svn:eol-style properties.

[originally from svn r8980]

13 years agoCancelling a remote port forwarding that had been refused by the server caused
Jacob Nevins [Fri, 30 Jul 2010 20:47:03 +0000 (20:47 +0000)]
Cancelling a remote port forwarding that had been refused by the server caused
a double-free. Reported and diagnosed by Sven Schaepe.
Also fix a minor memory leak in ssh_free().

[originally from svn r8975]

13 years agoA comment typo fix I've had lying around for a while.
Jacob Nevins [Fri, 30 Jul 2010 19:45:40 +0000 (19:45 +0000)]
A comment typo fix I've had lying around for a while.

[originally from svn r8974]

13 years agoPatch from Alan Ning (somewhat polished by me): introduce a flag
Simon Tatham [Sun, 4 Jul 2010 22:53:53 +0000 (22:53 +0000)]
Patch from Alan Ning (somewhat polished by me): introduce a flag
called 'pending_close'. This deals with the situation in which we're
forwarding a port, have received and locally buffered some data from
the local endpoint but not yet been able to pass it down the SSH
connection due to window limitations, and then the local endpoint
closes its socket. In this situation what we've been doing until now
is to immediately send SSH2_MSG_CHANNEL_CLOSE, causing the data
still in our local buffer to be lost; now we instead set the new
flag, which will remind us to send SSH2_MSG_CHANNEL_CLOSE _after_ we
empty our bufchain.

Should fix at least one manifestation of 'portfwd-close', though I
don't know if it's the cause of all the reports we've ever seen.

[originally from svn r8971]

13 years agoSet WM_TRANSIENT_FOR appropriately on the "about" box so that fvwm doesn't
Ben Harris [Tue, 29 Jun 2010 22:00:43 +0000 (22:00 +0000)]
Set WM_TRANSIENT_FOR appropriately on the "about" box so that fvwm doesn't
insist on finding a bit of spare screen to put it in.  Still pondering whether
it's sensible to do this with the "change settings" box as well.

[originally from svn r8970]

14 years agoMove '-w' in the #! line into 'use warnings;' in the Perl code, to
Simon Tatham [Sun, 30 May 2010 22:50:18 +0000 (22:50 +0000)]
Move '-w' in the #! line into 'use warnings;' in the Perl code, to
simplify the #! line.

[originally from svn r8967]

14 years ago'perl -w' safety in mkfiles.pl.
Simon Tatham [Sat, 29 May 2010 14:04:09 +0000 (14:04 +0000)]
'perl -w' safety in mkfiles.pl.

[originally from svn r8958]

14 years agoRestore the configure check for GTK 1, which I accidentally removed
Simon Tatham [Sat, 22 May 2010 14:07:25 +0000 (14:07 +0000)]
Restore the configure check for GTK 1, which I accidentally removed
as part of r8952 (the patch submitter had done it as a temporary
measure and I forgot to undo it before checkin).

[originally from svn r8956]
[r8952 == 99fffd6ed357d25a228637be173e8187746b6b77]

14 years agoPatch from Alejandro Sedeno, somewhat modified by me, which
Simon Tatham [Wed, 19 May 2010 18:22:17 +0000 (18:22 +0000)]
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]

14 years agoWhen doing custom bob builds from a given SVN revision, include the
Simon Tatham [Mon, 26 Apr 2010 17:28:42 +0000 (17:28 +0000)]
When doing custom bob builds from a given SVN revision, include the
date and time in the About box.

[originally from svn r8934]

14 years agoBah, missed out a tiny but build-breaking part of r8926.
Simon Tatham [Sat, 24 Apr 2010 07:14:29 +0000 (07:14 +0000)]
Bah, missed out a tiny but build-breaking part of r8926.

[originally from svn r8927]
[r8926 == d5aa23c1160e7bf866a0f4ff62c652c8b363a662]

14 years agoNew SSH bug flag, for 'can't handle SSH2_MSG_IGNORE'. Another user
Simon Tatham [Fri, 23 Apr 2010 18:32:15 +0000 (18:32 +0000)]
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]

14 years agoAdd comments on OpenSSH AES-encrypted key support, including one
Simon Tatham [Mon, 12 Apr 2010 11:02:06 +0000 (11:02 +0000)]
Add comments on OpenSSH AES-encrypted key support, including one
mentioning that I haven't yet switched to _exporting_ OpenSSH keys
in the new style.

[originally from svn r8917]

14 years agoSupport importing of new-style OpenSSH private keys (encrypted by
Simon Tatham [Mon, 12 Apr 2010 10:55:31 +0000 (10:55 +0000)]
Support importing of new-style OpenSSH private keys (encrypted by
AES rather than 3DES).

[originally from svn r8916]

14 years agoRemove SECURITY_WIN32 (knock-on from r8910, which validates it somewhat).
Jacob Nevins [Fri, 26 Mar 2010 00:54:05 +0000 (00:54 +0000)]
Remove SECURITY_WIN32 (knock-on from r8910, which validates it somewhat).

[originally from svn r8911]
[r8910 == a626074b26154131ef2ebec6ca20f7abfb38317b]

14 years agor8909 broke the Visual Studio build.
Jacob Nevins [Thu, 25 Mar 2010 18:41:27 +0000 (18:41 +0000)]
r8909 broke the Visual Studio build.

[originally from svn r8910]
[r8909 == c18b150623eaeb3a142b23fd02574ff643412e59]

14 years agoWhen looking for a local username on Windows, if we can get hold of the
Jacob Nevins [Wed, 24 Mar 2010 20:12:25 +0000 (20:12 +0000)]
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]

14 years agor8854/5 broke compilation with Gtk 1.2. Grow a hack to cope.
Jacob Nevins [Sun, 14 Mar 2010 18:58:20 +0000 (18:58 +0000)]
r8854/5 broke compilation with Gtk 1.2. Grow a hack to cope.

[originally from svn r8901]
[r8854 == 14247162f7bd9969361cb8c6276c73dd18ea11ee]
[r8855 == 7e16457d14ffae47303da8c48af98de68bb3a6ed]

14 years agoI think r8738 broke IPv6 in MSVC Windows builds due to conflict with the
Jacob Nevins [Sat, 13 Mar 2010 15:14:30 +0000 (15:14 +0000)]
I think r8738 broke IPv6 in MSVC Windows builds due to conflict with the
WspiapiGetAddrInfo wrapper for getaddrinfo() in MSVC. Split GET_WINDOWS_FUNCTION
into two variants, one with the old behaviour (bypassing the preprocessor) and
another with the new behaviour (for ANSI/Unicode, although it's not actually
used anywhere currently).

[originally from svn r8898]
[r8738 == 24b6168c1d4e6bf226f603a9b94c1ebf942b96f0]

14 years agoTweak description of dynamic port forwarding, and point people running into
Jacob Nevins [Sat, 13 Mar 2010 14:47:14 +0000 (14:47 +0000)]
Tweak description of dynamic port forwarding, and point people running into
'Out of space for port forwardings' at it.

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

14 years agoCentralise generation of the control sequences for arrow keys into a
Simon Tatham [Sat, 6 Mar 2010 15:50:26 +0000 (15:50 +0000)]
Centralise generation of the control sequences for arrow keys into a
function in terminal.c, and replace the cloned-and-hacked handling
code in all our front ends with calls to that.

This was intended for code cleanliness, but a side effect is to make
the GTK arrow-key handling support disabling of application cursor
key mode in the Features panel. Previously that checkbox was
accidentally ignored, and nobody seems to have noticed before!

[originally from svn r8896]

14 years agoUnix console utilities should send prompts to /dev/tty or failing
Simon Tatham [Sat, 20 Feb 2010 19:15:25 +0000 (19:15 +0000)]
Unix console utilities should send prompts to /dev/tty or failing
that stderr, not to stdout.

[originally from svn r8878]

14 years agoColin Watson reports that linking with 'gold' doesn't work, because
Simon Tatham [Sat, 20 Feb 2010 19:06:30 +0000 (19:06 +0000)]
Colin Watson reports that linking with 'gold' doesn't work, because
PuTTY makes explicit use of libX11 without including -lX11 on the
link line. (GNU ld appears to pull in libX11 automatically because
it's needed for the dependencies of GTK, but gold expects that
dependency to be satisfied at run time via DT_NEEDED and hence
doesn't bother.) Hence, add explicit -lX11 to both Makefile.gtk and
the autoconf world.

[originally from svn r8876]

14 years agoUpdate to r8614: another -D_FORTIFY_SOURCE=2 fix.
Simon Tatham [Sat, 20 Feb 2010 11:21:25 +0000 (11:21 +0000)]
Update to r8614: another -D_FORTIFY_SOURCE=2 fix.

[originally from svn r8875]
[r8614 == 4bddcc2b5dd6467ce9aa8bebea9ceedcda8903e5]

14 years agoNull out the socket pointers in X- and port-forwarding channels for
Simon Tatham [Wed, 17 Feb 2010 19:02:04 +0000 (19:02 +0000)]
Null out the socket pointers in X- and port-forwarding channels for
which we close the socket without destroying the channel. John
Peterson reports periodic crashes under heavy load which appear to
be fixed by this, though I don't know the exact circumstances
induced by that load.

[originally from svn r8871]

14 years ago...and the rest of r8854.
Jacob Nevins [Mon, 25 Jan 2010 14:33:39 +0000 (14:33 +0000)]
...and the rest of r8854.

[originally from svn r8855]
[r8854 == 14247162f7bd9969361cb8c6276c73dd18ea11ee]

14 years agoOur handling of timers in Gtk was truncating times on 64-bit systems; one
Jacob Nevins [Sat, 23 Jan 2010 12:25:31 +0000 (12:25 +0000)]
Our handling of timers in Gtk was truncating times on 64-bit systems; one
symptom was that the terminal window would not update until a focus-change
event. Spotted and patched by Max Kellermann.

[originally from svn r8854]

14 years agoRevert r8847, which was bilge; I can't magically change the order of a tree
Jacob Nevins [Sun, 17 Jan 2010 23:53:29 +0000 (23:53 +0000)]
Revert r8847, which was bilge; I can't magically change the order of a tree
just by giving a different sorting function to find234().

[originally from svn r8849]
[r8847 == 7f7877e9a52c27082a9555e147a694c39ca576b0]

14 years agoIt's a new year.
Jacob Nevins [Sun, 17 Jan 2010 17:27:27 +0000 (17:27 +0000)]
It's a new year.

[originally from svn r8848]
[this svn revision also touched putty-website]

14 years agoChange expiry of timers when their contexts go away from lazy to eager.
Jacob Nevins [Sun, 17 Jan 2010 16:22:35 +0000 (16:22 +0000)]
Change expiry of timers when their contexts go away from lazy to eager.
Intended to be of benefit to derived code making many connections from a single
process.

[originally from svn r8847]

14 years agoPlug a few minor memory leaks, based on a patch by Sirp Potijk.
Jacob Nevins [Sun, 17 Jan 2010 16:20:45 +0000 (16:20 +0000)]
Plug a few minor memory leaks, based on a patch by Sirp Potijk.
While I'm here, add an assertion in sshrand.c to catch mistakes in reference
counting.

[originally from svn r8846]

14 years agoOn Windows, character set specifications of the form 'IBM437' would never have
Jacob Nevins [Sun, 22 Nov 2009 19:10:11 +0000 (19:10 +0000)]
On Windows, character set specifications of the form 'IBM437' would never have
worked due to a typo. Spotted by Todd Burkey.

[originally from svn r8755]

14 years agoAdd a keyboard shortcut for the "serial" protocol to the GUI.
Jacob Nevins [Fri, 13 Nov 2009 13:24:32 +0000 (13:24 +0000)]
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]

14 years agoPatch from Tim Kosse to fix 64-bit-cleanness in SHA-512.
Simon Tatham [Tue, 10 Nov 2009 19:14:15 +0000 (19:14 +0000)]
Patch from Tim Kosse to fix 64-bit-cleanness in SHA-512.

[originally from svn r8746]

14 years agoWe defined tried_shgetfolderpath but never actually set it. Harmless, but fixed.
Jacob Nevins [Sun, 8 Nov 2009 19:25:22 +0000 (19:25 +0000)]
We defined tried_shgetfolderpath but never actually set it. Harmless, but fixed.

[originally from svn r8740]

14 years agoUse DECL/GET_WINDOWS_FUNCTION in a few more places in place of ad-hoc
Jacob Nevins [Sun, 8 Nov 2009 19:22:28 +0000 (19:22 +0000)]
Use DECL/GET_WINDOWS_FUNCTION in a few more places in place of ad-hoc
GetProcAddress().

[originally from svn r8739]

14 years agoMove the two existing DECL/GET_foo_FUNCTION macro sets used for dynamic
Jacob Nevins [Sun, 8 Nov 2009 18:47:41 +0000 (18:47 +0000)]
Move the two existing DECL/GET_foo_FUNCTION macro sets used for dynamic
linking on Windows into a single global one, which can cope with function
renaming. Intended to enable eventual removal of ANSI-specific DoSomethingA
references (although I've not removed any).

[originally from svn r8738]

14 years agoImprove buffer handling in Windows sk_getaddr() -- we were passing
Jacob Nevins [Sun, 8 Nov 2009 18:25:29 +0000 (18:25 +0000)]
Improve buffer handling in Windows sk_getaddr() -- we were passing
uninitialised storage into WSAAddressToString()'s length function (and
presumably getting away with it by luck).
Also improve error handling (exposed by my Wine installation, which returns
an error from WSAAddressToString() for connections to localhost for some
reason).

[originally from svn r8737]

14 years agoStop trying to enumerate all the kinds of Windows we support on the download
Jacob Nevins [Sun, 1 Nov 2009 22:06:05 +0000 (22:06 +0000)]
Stop trying to enumerate all the kinds of Windows we support on the download
page. Define in more detail what we mean by "Windows" in the Ports section of
the FAQ.

[originally from svn r8733]
[this svn revision also touched putty-website]

14 years agoRemove is_shift_pressed() -- it's not been used since r4906.
Jacob Nevins [Sun, 27 Sep 2009 16:20:39 +0000 (16:20 +0000)]
Remove is_shift_pressed() -- it's not been used since r4906.

[originally from svn r8666]
[r4906 == 7ecf13564a8d716000ce78146d1aaf4422432a4f]

14 years agoAnother warning fix and cosmetic tweakage.
Jacob Nevins [Sun, 27 Sep 2009 16:07:10 +0000 (16:07 +0000)]
Another warning fix and cosmetic tweakage.

[originally from svn r8665]

14 years agoQuell more warnings and, perhaps, avoid alignment faults on 64-bit Windows.
Jacob Nevins [Sun, 27 Sep 2009 15:52:13 +0000 (15:52 +0000)]
Quell more warnings and, perhaps, avoid alignment faults on 64-bit Windows.

[originally from svn r8664]

14 years agoFix some (probably harmless) warnings.
Jacob Nevins [Sun, 27 Sep 2009 15:31:08 +0000 (15:31 +0000)]
Fix some (probably harmless) warnings.

[originally from svn r8663]

14 years agoChange manifest files to declare Windows GUI apps to be "DPI-aware", that is,
Jacob Nevins [Fri, 25 Sep 2009 23:32:14 +0000 (23:32 +0000)]
Change manifest files to declare Windows GUI apps to be "DPI-aware", that is,
not fazed by being displayed at other than 96DPI; testing on Vista at a range
of DPIs indicates that we cope (with the minor and inevitable exception of the
drag-list control).
This stops pixel scaling and hence fuzzy display on high-resolution displays.
(Hope this is last disastrous than my last set of manifest tweaks! --
<http://support.fogcreek.com/default.asp?copilot.6.26840.1> suggests that this
is an OK thing to do.)

[originally from svn r8661]

14 years agoFix minor file descriptor leaks. Found by cppcheck, reported by Tim Kosse.
Jacob Nevins [Wed, 16 Sep 2009 22:28:20 +0000 (22:28 +0000)]
Fix minor file descriptor leaks. Found by cppcheck, reported by Tim Kosse.

[originally from svn r8656]

14 years agoSince r7266, it's been possible to get a hostname into Default Settings; but
Jacob Nevins [Mon, 14 Sep 2009 21:26:48 +0000 (21:26 +0000)]
Since r7266, it's been possible to get a hostname into Default Settings; but
plink did not cope gracefully with this -- it was not possible to override that
hostname on the command line (attempts at doing so would be treated as part of
the remote command).
Fix this by applying the principle of r7265: if the user didn't explicitly
specify that they wanted to launch the hostname in the default (for instance
with '-load "Default Settings"', we assume they don't want to, and such a
hostname doesn't count when deciding whether to treat a non-option argument as
hostname or command.

[originally from svn r8651]
[r7265 == 5d76e00dac9220e8798e4d0f17a4069a58ae1667]
[r7266 == 856ed4ae73576ef5725f1ea4999f40907ab13589]

14 years agoIn Unix PuTTY, grey out "Restart Session" when it doesn't apply (as the Windows
Jacob Nevins [Sun, 13 Sep 2009 23:41:55 +0000 (23:41 +0000)]
In Unix PuTTY, grey out "Restart Session" when it doesn't apply (as the Windows
version does), rather than hiding it completely.

[originally from svn r8650]

14 years agoAdd a couple of ellipses in Unix context menu (like r759 on Windows).
Jacob Nevins [Sun, 13 Sep 2009 23:37:55 +0000 (23:37 +0000)]
Add a couple of ellipses in Unix context menu (like r759 on Windows).

[originally from svn r8649]
[r759 == 779069ccd3173cbeee604fd328aac750f5aef466]

14 years agoIf there are no saved sessions, put a grayed "(No sessions)" entry on the saved
Jacob Nevins [Sun, 13 Sep 2009 23:29:11 +0000 (23:29 +0000)]
If there are no saved sessions, put a grayed "(No sessions)" entry on the saved
sessions submenu of the terminal window context menu (as Pageant does), rather
than an empty menu (which often renders poorly).

[originally from svn r8648]

14 years agoAvoid compiling autoconf test programs with -Wall -Werror; doing so causes
Jacob Nevins [Sun, 30 Aug 2009 13:16:50 +0000 (13:16 +0000)]
Avoid compiling autoconf test programs with -Wall -Werror; doing so causes
trouble on Ubuntu, where the Gtk test programs don't check the return value
from system() and thus fall foul of the combination of our -Werror and
<https://wiki.ubuntu.com/CompilerFlags#-D_FORTIFY_SOURCE=2>.

[originally from svn r8638]

14 years agoMinor improvements to error reporting in logging.
Jacob Nevins [Sun, 30 Aug 2009 11:09:22 +0000 (11:09 +0000)]
Minor improvements to error reporting in logging.

[originally from svn r8637]

14 years agoRemove outdated comment.
Jacob Nevins [Fri, 21 Aug 2009 23:25:48 +0000 (23:25 +0000)]
Remove outdated comment.

[originally from svn r8628]

14 years agoFrom Corey Stup: when we're declaring stuff for WSAAddressToStringA, we should
Jacob Nevins [Fri, 21 Aug 2009 22:29:58 +0000 (22:29 +0000)]
From Corey Stup: when we're declaring stuff for WSAAddressToStringA, we should
use the explicitly-narrow type LPSTR, not the switchable type LPTSTR. (Since
we currently build without UNICODE this makes no practical difference to us
now.)

[originally from svn r8627]

14 years agoCorey Stup points out a memory leak in the local-proxy implementations.
Jacob Nevins [Fri, 21 Aug 2009 21:16:22 +0000 (21:16 +0000)]
Corey Stup points out a memory leak in the local-proxy implementations.

[originally from svn r8626]

14 years agoCorey Stup points out that any attempt to display the message "Unable to load
Jacob Nevins [Fri, 21 Aug 2009 20:05:24 +0000 (20:05 +0000)]
Corey Stup points out that any attempt to display the message "Unable to load
any WinSock library" will lead to a segfault.

[originally from svn r8625]

14 years agoAttempt to filter out duplicate port forwardings in the GUI.
Jacob Nevins [Tue, 18 Aug 2009 23:51:49 +0000 (23:51 +0000)]
Attempt to filter out duplicate port forwardings in the GUI.

[originally from svn r8624]

14 years agoFix handling of duplicate port forwardings; they were effectively cancelling
Jacob Nevins [Tue, 18 Aug 2009 23:38:48 +0000 (23:38 +0000)]
Fix handling of duplicate port forwardings; they were effectively cancelling
out, but are now just ignored.
(We should make more effort to prevent duplicates before they get as far as
ssh_setup_portfwd() -- it's currently trivially easy to enter them in the
GUI and on the command line, let alone both -- but there's bound to be someone
with a saved session containing dupes out there by now, and anyway there are
duplicates we can't detect before getting this far, for instance
"1234:localhost:22" vs "1234:localhost:ssh".)

[originally from svn r8623]

14 years agoQuell "config.status: WARNING: Makefile.in seems to ignore the --datarootdir
Jacob Nevins [Sun, 16 Aug 2009 22:51:20 +0000 (22:51 +0000)]
Quell "config.status: WARNING:  Makefile.in seems to ignore the --datarootdir
setting" warning when running ./configure, per
<http://www.gnu.org/software/autoconf/manual/html_node/Changed-Directory-Variables.html>

[originally from svn r8622]

14 years agoKeep the state of the "Full Screen" menu item on the Ctrl+right-click context
Jacob Nevins [Sat, 15 Aug 2009 17:45:17 +0000 (17:45 +0000)]
Keep the state of the "Full Screen" menu item on the Ctrl+right-click context
menu in sync with reality and the system menu.

[originally from svn r8620]

14 years agoAdd "-serial" to Plink's usage message.
Jacob Nevins [Thu, 13 Aug 2009 22:01:20 +0000 (22:01 +0000)]
Add "-serial" to Plink's usage message.

[originally from svn r8618]

14 years agoPatch from Alan Clucas (somewhat polished) providing command-line
Simon Tatham [Mon, 10 Aug 2009 20:55:19 +0000 (20:55 +0000)]
Patch from Alan Clucas (somewhat polished) providing command-line
options to select and configure serial port mode.

[originally from svn r8617]

14 years agoFixes for re-entrant calls in the serial configuration list boxes.
Simon Tatham [Mon, 10 Aug 2009 20:38:46 +0000 (20:38 +0000)]
Fixes for re-entrant calls in the serial configuration list boxes.
(I'm starting to think I made an egregious design error somewhere in
this mechanism.)

[originally from svn r8616]

14 years agoWorkarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which
Jacob Nevins [Fri, 7 Aug 2009 00:19:04 +0000 (00:19 +0000)]
Workarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which
doesn't like you to ignore the return value from read()/write()/etc (and
apparently can't be shut up with a cast to void).

[originally from svn r8614]

14 years agoMore use of sockaddr_union (above and beyond that necessary to remove current
Jacob Nevins [Thu, 6 Aug 2009 22:55:15 +0000 (22:55 +0000)]
More use of sockaddr_union (above and beyond that necessary to remove current
warnings).

[originally from svn r8613]

14 years agoAvoid "dereferencing pointer 'sa' does break strict-aliasing rules" warnings
Jacob Nevins [Thu, 6 Aug 2009 22:12:05 +0000 (22:12 +0000)]
Avoid "dereferencing pointer 'sa' does break strict-aliasing rules" warnings
from recent versions of GCC.

[originally from svn r8612]

14 years agoAlex Besogonov suggests that our Unix autoconf GSSAPI library search order is
Jacob Nevins [Tue, 28 Jul 2009 23:45:48 +0000 (23:45 +0000)]
Alex Besogonov suggests that our Unix autoconf GSSAPI library search order is
sub-optimal -- apparently it prefers shishi above Heimdal, and apparently
that's bad.

[originally from svn r8610]

14 years agoMention Makefile.ux.
Jacob Nevins [Tue, 28 Jul 2009 23:30:38 +0000 (23:30 +0000)]
Mention Makefile.ux.
Be less certain about the possibility of building with vanilla VC6.
Provide more details of actively tested toolchains.

[originally from svn r8609]

14 years agoInclude putty.h (and hence uxconfig.h) before testing for NO_GSSAPI, so that
Jacob Nevins [Tue, 28 Jul 2009 23:20:50 +0000 (23:20 +0000)]
Include putty.h (and hence uxconfig.h) before testing for NO_GSSAPI, so that
"./configure --without-gssapi" actually works. Spotted by Rob Shinn.

[originally from svn r8608]

14 years agoTypo: replace a \i with a \I.
Simon Tatham [Sun, 12 Jul 2009 12:02:58 +0000 (12:02 +0000)]
Typo: replace a \i with a \I.

[originally from svn r8607]

14 years agoClearing and refilling the code-pages list box can cause a
Simon Tatham [Wed, 10 Jun 2009 17:42:15 +0000 (17:42 +0000)]
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]

15 years agoAdd a 'unix' Makefile type, for building the non-GUI parts of the
Simon Tatham [Mon, 11 May 2009 18:48:43 +0000 (18:48 +0000)]
Add a 'unix' Makefile type, for building the non-GUI parts of the
PuTTY suite on non-GTK-enabled build platforms.

[originally from svn r8577]

15 years agoPango-based font handling: combine display of adjacent characters
Simon Tatham [Mon, 11 May 2009 08:46:17 +0000 (08:46 +0000)]
Pango-based font handling: combine display of adjacent characters
into a single gdk_draw_layout() where conveniently feasible, after
some work with xtrace revealed this as a major source of pterm's
slow display updates when using client-side fonts.

Ideally we ought to be able to do better. I know exactly what
sequence of X protocol operations I want to see on the wire, but I
don't know how to persuade Pango to generate them.

[originally from svn r8558]

15 years agoAnsgar Wiechers points out that known_hosts (at least OpenSSH's) has grown a
Jacob Nevins [Sun, 26 Apr 2009 23:44:28 +0000 (23:44 +0000)]
Ansgar Wiechers points out that known_hosts (at least OpenSSH's) has grown a
means of specifying port numbers, so we should support that.

[originally from svn r8519]

15 years agoDiscard hashed hostnames from input.
Jacob Nevins [Sun, 26 Apr 2009 23:03:02 +0000 (23:03 +0000)]
Discard hashed hostnames from input.

[originally from svn r8518]

15 years agoReported by Tim Kosse: on Unix, read_random_seed() wasn't correctly checking
Jacob Nevins [Sun, 26 Apr 2009 22:32:41 +0000 (22:32 +0000)]
Reported by Tim Kosse: on Unix, read_random_seed() wasn't correctly checking
the return from open() and behaved wrongly in the absence of a seed file.

[originally from svn r8517]

15 years agoSeveral people have spotted an uninitialised structure member leading to a
Jacob Nevins [Sun, 26 Apr 2009 22:19:30 +0000 (22:19 +0000)]
Several people have spotted an uninitialised structure member leading to a
potential crash on "reget" in Unix PSFTP.

[originally from svn r8516]

15 years agoRichard Clark points out a missing check for ssh->mainchan being NULL.
Simon Tatham [Fri, 24 Apr 2009 18:45:22 +0000 (18:45 +0000)]
Richard Clark points out a missing check for ssh->mainchan being NULL.

[originally from svn r8502]

15 years agoWhen giving authorisation errors from the proxy code in x11fwd.c,
Simon Tatham [Thu, 23 Apr 2009 17:39:36 +0000 (17:39 +0000)]
When giving authorisation errors from the proxy code in x11fwd.c,
name the proxy using the global 'appname' variable, instead of
statically calling it PuTTY.

(Knock-on effect is that PSCP and PSFTP have to declare that
variable, though of course they shouldn't ever actually _use_ the X
forwarding code. Probably I ought to replace it with a stub
nox11fwd.c for those applications.)

[originally from svn r8501]

15 years agoWhen starting a SOCKS connection in dynamic forwarding, freeze the
Simon Tatham [Thu, 23 Apr 2009 17:33:42 +0000 (17:33 +0000)]
When starting a SOCKS connection in dynamic forwarding, freeze the
local socket _before_ calling the SSH setup functions. This makes no
difference to ssh.c itself, but it makes portfwd.c easier to reuse
for other purposes (e.g. as a component of a standalone SOCKS
server), because now ssh_send_port_open() can itself call
pfd_confirm() without the freeze and unfreeze happening in the wrong
order.

[originally from svn r8500]

15 years agoSupport in the cross-platform code for translating to and from
Simon Tatham [Tue, 24 Mar 2009 22:24:31 +0000 (22:24 +0000)]
Support in the cross-platform code for translating to and from
UTF-16 when exchanging wchar_t strings with the front end. Enabled
by a #define in the platform's header file (one should not
promiscuously translate UTF-16 surrogate pairs on 32-bit wchar_t
platforms since that could give rise to redundant encoding attacks),
which is present on Windows.

[originally from svn r8495]

15 years agoFix cosmetic keyboard-interactive issue: at the end of a normal k-i session,
Jacob Nevins [Tue, 3 Mar 2009 19:57:58 +0000 (19:57 +0000)]
Fix cosmetic keyboard-interactive issue: at the end of a normal k-i session,
some servers (Debian in particular seems prone to this) send a k-i packet with
no prompts and nothing to display. We were printing an extra "Using
keyboard-interactive authentication" message in this case. (Introduced by me
in r8172, I think.)

[originally from svn r8492]
[r8172 == 211fdb9f46377b0f3052c0a29f6934cce3dbfb02]

15 years agoHandle more gracefully the possibility of a keyboard-interactive
Simon Tatham [Tue, 3 Mar 2009 18:35:53 +0000 (18:35 +0000)]
Handle more gracefully the possibility of a keyboard-interactive
prompts packet containing no actual prompts (perhaps due to odd
server organisation, or perhaps so it can print a banner message and
do nothing else). Previously, the get_userpass_input functions
always returned failure when in '-batch' mode, even in this case
where no actual input would be required.

[originally from svn r8490]

15 years agoStop using physical tabs in Python. (I was goaded into doing this by
Simon Tatham [Sat, 28 Feb 2009 23:04:58 +0000 (23:04 +0000)]
Stop using physical tabs in Python. (I was goaded into doing this by
my editor, which has defaulted to showing them as explicit ^I for a
while now, but it seems like a generally prudent idea in any case.)

[originally from svn r8472]

15 years agoDebian bug #517535: we were unconditionally interpreting the
Simon Tatham [Sat, 28 Feb 2009 16:52:42 +0000 (16:52 +0000)]
Debian bug #517535: we were unconditionally interpreting the
'string' field in a GdkEventKey structure as ISO-8859-1, which was
correct for GTK 1.2 but in 2.0 that field is encoded according to
the current C library locale. Hence, we now process that field by
converting it to UTF-8 via trips through both libc and libcharset,
and then let lpage_send() convert from UTF-8 back to whatever it's
supposed to actually go down the line in.

[originally from svn r8470]

15 years agoFix inaccurate error message.
Jacob Nevins [Tue, 24 Feb 2009 22:56:44 +0000 (22:56 +0000)]
Fix inaccurate error message.

[originally from svn r8466]

15 years agoSince r8305, Unix PuTTY has always "upgraded" an X11 display like "localhost:0"
Jacob Nevins [Tue, 24 Feb 2009 01:01:23 +0000 (01:01 +0000)]
Since r8305, Unix PuTTY has always "upgraded" an X11 display like "localhost:0"
to a Unix-domain socket. This typically works fine when PuTTY is run on the
same machine as the X server, but it's broken multi-hop X forwarding through
OpenSSH; when OpenSSH creates a proxy X server "localhost:10", it only listens
on TCP, not on a Unix-domain socket.

Instead, when deciding on the details of the display, we actively probe to see
if there's a Unix-domain socket we can use instead, and only use it if it's
there, falling back to the specified IP "localhost" if not.

Independently, when looking for local auth details in Xauthority for a
"localhost" TCP display, we prefer a matching Unix-domain entry, but will fall
back to an IP "localhost" entry (which would be unusual, but we don't trust a
Windows X server not to do it) -- this is a generalisation of the special case
added in r2538 (but removed in r8305, as the automatic upgrade masked the need
for it).
(This is now done in platform-independent code, so a side-effect is that
get_hostname() is now part of the networking abstraction on all platforms.)

[originally from svn r8462]
[r2538 == fda998324345ba50a913655754303ce8f0a4cfde]
[r8305 == ca6fc3a4daf51166a15693feffc967bee9e3f59a]

15 years agoStop attempting to make session logs private on Unix. This was introduced in
Jacob Nevins [Mon, 23 Feb 2009 22:40:09 +0000 (22:40 +0000)]
Stop attempting to make session logs private on Unix. This was introduced in
r7084 at the same time as sensible permissions when writing private key files;
however, it causes an assertion failure whenever an attempt is made to append
to an existing log file on Unix, and it's not clear what "is_private" *should*
do for append, so revert to log file security being the user's responsibility.
(Fixes Ubuntu LP#212711.)

[originally from svn r8461]
[r7084 == 4fa9564c909c589bcccc95d57fae5469063c1759]

15 years agoThe Windows config option to point at an X authority file is only
Simon Tatham [Tue, 3 Feb 2009 21:22:52 +0000 (21:22 +0000)]
The Windows config option to point at an X authority file is only
read at connection setup time, so don't offer it in the Change
Settings dialog box.

(In particular, this fixes an assertion failure when selecting
Change Settings on a non-SSH connection, since wincfg.c would have
added that control to Connection/SSH/X11 when the parent panel
Connection/SSH didn't exist. Making the control conditional on the
selected protocol would have been sufficient to fix that failure,
but I now realise that the setting should never have been presented
in mid-session in any case.)

[originally from svn r8443]

15 years agoDon't call ReleaseCapture() on any mouse-button-up event. Instead,
Simon Tatham [Wed, 21 Jan 2009 18:47:03 +0000 (18:47 +0000)]
Don't call ReleaseCapture() on any mouse-button-up event. Instead,
only call it when the _last_ mouse button comes back up. Otherwise,
xterm mouse tracking will lose a button-up event if you press down
two buttons, move the mouse outside the window, then release them
one at a time.

[originally from svn r8425]

15 years agoCheck the two popen() calls in noise_get_heavy for NULL.
Simon Tatham [Tue, 13 Jan 2009 18:18:35 +0000 (18:18 +0000)]
Check the two popen() calls in noise_get_heavy for NULL.

[originally from svn r8411]

15 years agoPatch from Gert-Jan Vons: create an event handle to go in the
Simon Tatham [Mon, 12 Jan 2009 20:41:28 +0000 (20:41 +0000)]
Patch from Gert-Jan Vons: create an event handle to go in the
OVERLAPPED structure in output threads, as we already do for input
threads. This apparently sorts out a hanging issue with serial ports
when trying to do simultaneous read and write, because (GJV says,
and it sounds plausible to me) in the absence of that event object
Windows signals the file handle itself to notify GetOverlappedResult
that it can return - and since the file handle might be being
signalled by a read operation instead, that leads to ambiguity.
Using an explicit event object in both directions means Windows
always knows which way the data is going.

Also a trivial fix in handle_output_new(), which was referencing the
wrong element of a union due to a copy and paste error. (Since the
result was address-taken and cast to void *, this wasn't a
functional error, but it was conceptually wrong.)

[originally from svn r8410]

15 years agoArguments to ctype functions are required to be either EOF or representable
Ben Harris [Sun, 11 Jan 2009 14:26:27 +0000 (14:26 +0000)]
Arguments to ctype functions are required to be either EOF or representable
as unsigned char.  This means that passing in a bare char is incorrect on
systems where char is signed.  Sprinkle some appropriate casts to prevent
this.

[originally from svn r8406]