u/mdw/putty
13 years agoAdd an option to disable SSH-2 banners.
jacob [Mon, 27 Dec 2010 01:19:13 +0000 (01:19 +0000)]
Add an option to disable SSH-2 banners.

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

13 years agoFix up svn:eol-style and svn:keywords on new files.
jacob [Mon, 27 Dec 2010 00:24:48 +0000 (00:24 +0000)]
Fix up svn:eol-style and svn:keywords on new files.

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

13 years agoRemove a couple of unused variables.
jacob [Sun, 26 Dec 2010 23:23:11 +0000 (23:23 +0000)]
Remove a couple of unused variables.

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

13 years agoTry to delete jump lists in "-cleanup".
jacob [Sun, 26 Dec 2010 20:00:45 +0000 (20:00 +0000)]
Try to delete jump lists in "-cleanup".

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

13 years agoOptionally define PropVariantInit() locally to restore ability to build with
jacob [Sun, 26 Dec 2010 18:29:53 +0000 (18:29 +0000)]
Optionally define PropVariantInit() locally to restore ability to build with
MinGW after r9046, and munge the COMPTR() macro to remove a couple of warnings
with my MinGW GCC (3.4.5).

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

13 years agoDocument the behaviour of Alt in the "hybrid" resizing mode alluded to in
jacob [Thu, 23 Dec 2010 22:19:13 +0000 (22:19 +0000)]
Document the behaviour of Alt in the "hybrid" resizing mode alluded to in
r9045.

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

13 years agoSupport for Windows 7 jump lists (right-click on a program's taskbar
simon [Thu, 23 Dec 2010 17:32:28 +0000 (17:32 +0000)]
Support for Windows 7 jump lists (right-click on a program's taskbar
icon, even if the program isn't running at the time, to be presented
with an application-defined collection of helpful links). The current
jump list is updated every time a saved session is loaded, and shows
the last few launchable saved sessions (i.e. not those like Default
Settings) that were loaded. Also, if Pageant or PuTTYgen or both is in
the same directory as the PuTTY binary, the jump list will present
links to launch those too.

Based on a patch sent last year by Daniel B. Roy, though it's barely
recognisable any more...

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

13 years agoThe special treatment of Alt-resize (to cause resizing to affect the
simon [Thu, 23 Dec 2010 17:16:19 +0000 (17:16 +0000)]
The special treatment of Alt-resize (to cause resizing to affect the
font instead of the terminal size) should only be active in
RESIZE_EITHER mode - in RESIZE_TERM it is worse than useless.

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

13 years agoAnother fix to yesterday's window-resizing revamp: when restoring from
simon [Thu, 23 Dec 2010 15:44:20 +0000 (15:44 +0000)]
Another fix to yesterday's window-resizing revamp: when restoring from
maximised state, we must be sure to disable the window offset used to
centre the terminal in cases where the window is non-negotiably the
wrong size (e.g. maximised). Hence we must call reset_window after our
terminal resize.

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

13 years agoMore careful owner SID selection in the Pageant client code. This
simon [Thu, 23 Dec 2010 15:22:50 +0000 (15:22 +0000)]
More careful owner SID selection in the Pageant client code. This
should solve some of the SID-mismatch issues we've occasionally had
reported. Because it's a modification on the client side, it doesn't
affect the security of Pageant itself.

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

13 years agoPay attention to the width and height provided in WM_SIZE even when
simon [Wed, 22 Dec 2010 16:14:11 +0000 (16:14 +0000)]
Pay attention to the width and height provided in WM_SIZE even when
restoring a maximised window.

Failure to do this was noticeable in the following scenario (again
using Aero UI enhancements):
 1. resize window using topmost resize handle, and move pointer to top
    of screen which 'maximises' the window vertically
 2. now maximise the window properly using the maximise button in top
    right
 3. now restore. Notepad restores to its position before step 1,
    because Aero remembers that position for the purpose, but PuTTY
    thinks it knows better. Only now it doesn't any more.

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

13 years agoReorganise handling of WM_SIZE to fix two generality problems.
simon [Wed, 22 Dec 2010 15:49:33 +0000 (15:49 +0000)]
Reorganise handling of WM_SIZE to fix two generality problems.

Firstly, maximise and restore events were expected never to occur
during an interactive resize process (i.e. between WM_ENTERSIZEMOVE
and WM_EXITSIZEMOVE), but in fact Aero now allows this to happen if
you move the pointer to the top of the screen while dragging the
window.

Secondly, plain old WM_SIZE events were expected never to occur
_outside_ interactive resizes, but Aero permits that too (e.g.
Windows-left and Windows-right), and also third-party window
repositioning tools will send these.

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

13 years agoProtect against a (non-security-related) buffer overrun if PuTTY is
simon [Tue, 21 Dec 2010 10:11:32 +0000 (10:11 +0000)]
Protect against a (non-security-related) buffer overrun if PuTTY is
installed somewhere with an exceptionally long pathname.

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

13 years agoAdd an 'XLFLAGS' make variable to Makefile.vc, permitting user-
simon [Mon, 20 Dec 2010 13:04:34 +0000 (13:04 +0000)]
Add an 'XLFLAGS' make variable to Makefile.vc, permitting user-
supplied extra link flags. This makes it reasonably convenient to
compile for Visual Studio debugging: just build using

  nmake /f Makefile.vc XFLAGS="/Zi /Od" XLFLAGS="/debug"

then load the resulting executable into Visual Studio (using 'Open
Project' rather than 'Open File') and the debugger should be able to
access the source.

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

13 years agoAdd some more entries to svn:ignore to cope with stuff left by Visual
simon [Fri, 17 Dec 2010 13:42:52 +0000 (13:42 +0000)]
Add some more entries to svn:ignore to cope with stuff left by Visual
Studio 10. (Not that I think I'm about to migrate, but I've been
experimenting.)

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

13 years agoAdd more possible baud rates to the Unix serial backend. These are the
jacob [Wed, 8 Dec 2010 14:21:35 +0000 (14:21 +0000)]
Add more possible baud rates to the Unix serial backend. These are the
union of rates found in the termios.h of Linux 2.6.24 and "SunOS 5.6
Generic_105181-29 sun4u sparc SUNW,Ultra-4" machines. After a patch by
Thomas Bechtold.

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

13 years agoMore sensible (and also more idiomatic) bounds checking on esc_args.
simon [Tue, 7 Dec 2010 00:21:42 +0000 (00:21 +0000)]
More sensible (and also more idiomatic) bounds checking on esc_args.

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

13 years agoDavid Laight reports that sometimes reads on a serial port will
simon [Sat, 6 Nov 2010 17:22:38 +0000 (17:22 +0000)]
David Laight reports that sometimes reads on a serial port will
attempt to block, and hence return EAGAIN/EWOULDBLOCK, in spite of
the port having been reported readable by select(2). Don't treat
those errors as fatal.

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

13 years agoBah, r9008 caused an assertion failure on Windows due to a clash with the
jacob [Mon, 27 Sep 2010 11:33:40 +0000 (11:33 +0000)]
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.

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

13 years agoAdd index terms for GSSAPI stuff. Mention GSSAPI in "use system username"
jacob [Sat, 25 Sep 2010 16:18:02 +0000 (16:18 +0000)]
Add index terms for GSSAPI stuff. Mention GSSAPI in "use system username"
section and other tweaks.

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

13 years agoSince GSSAPI is now on its own panel, we may as well have a full set of
jacob [Sat, 25 Sep 2010 15:51:14 +0000 (15:51 +0000)]
Since GSSAPI is now on its own panel, we may as well have a full set of
keyboard shortcuts.

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

13 years agoOops: r9004 should have removed various pieces from the Makefile and
simon [Sat, 25 Sep 2010 08:37:30 +0000 (08:37 +0000)]
Oops: r9004 should have removed various pieces from the Makefile and
header file setup too.

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

13 years agoRetire the old Mac Classic port directory! It's been unused for
simon [Sat, 25 Sep 2010 07:30:08 +0000 (07:30 +0000)]
Retire the old Mac Classic port directory! It's been unused for
ages, is increasingly irrelevant now that 'Mac' pretty much
universally means something running OS X, is probably bit-rotted
past usefulness already, and certainly will be after the next time
some major reengineering takes place.

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

13 years agoCleanups of the GSSAPI support. On Windows, standard GSS libraries
simon [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.

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

13 years agoUse the same key for both saving and loading the GSSAPI implementation
jacob [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.

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

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

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

13 years agoCreate, and use for all loads of system DLLs, a wrapper function
simon [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.

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

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

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

13 years agoRemove redundant check for NULL in sshfwd_close(). The thing we're
simon [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.

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

13 years agoCast incoming characters to unsigned char to avoid accidental sign
simon [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.

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

13 years agoWhen we disconnect because we have no supported authentication
simon [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.

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

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

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

13 years agoCancelling a remote port forwarding that had been refused by the server caused
jacob [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().

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

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

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

13 years agoPatch from Alan Ning (somewhat polished by me): introduce a flag
simon [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.

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

13 years agoSet WM_TRANSIENT_FOR appropriately on the "about" box so that fvwm doesn't
ben [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.

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

13 years agoMove '-w' in the #! line into 'use warnings;' in the Perl code, to
simon [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.

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

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

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

13 years agoRestore the configure check for GTK 1, which I accidentally removed
simon [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).

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

14 years agoPatch from Alejandro Sedeno, somewhat modified by me, which
simon [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.

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

14 years agoWhen doing custom bob builds from a given SVN revision, include the
simon [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.

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

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

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

14 years agoNew SSH bug flag, for 'can't handle SSH2_MSG_IGNORE'. Another user
simon [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.]

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

14 years agoAdd comments on OpenSSH AES-encrypted key support, including one
simon [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.

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

14 years agoSupport importing of new-style OpenSSH private keys (encrypted by
simon [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).

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

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

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

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

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

14 years agoWhen looking for a local username on Windows, if we can get hold of the
jacob [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.

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

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

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

14 years agoI think r8738 broke IPv6 in MSVC Windows builds due to conflict with the
jacob [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).

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

14 years agoTweak description of dynamic port forwarding, and point people running into
jacob [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.

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

14 years agoCentralise generation of the control sequences for arrow keys into a
simon [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!

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

14 years agoUnix console utilities should send prompts to /dev/tty or failing
simon [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.

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

14 years agoColin Watson reports that linking with 'gold' doesn't work, because
simon [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.

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

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

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

14 years agoNull out the socket pointers in X- and port-forwarding channels for
simon [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.

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

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

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

14 years agoOur handling of timers in Gtk was truncating times on 64-bit systems; one
jacob [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.

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

14 years agoRevert r8847, which was bilge; I can't magically change the order of a tree
jacob [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().

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

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

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

14 years agoChange expiry of timers when their contexts go away from lazy to eager.
jacob [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.

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

14 years agoPlug a few minor memory leaks, based on a patch by Sirp Potijk.
jacob [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.

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

14 years agoOn Windows, character set specifications of the form 'IBM437' would never have
jacob [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.

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

14 years agoAdd a keyboard shortcut for the "serial" protocol to the GUI.
jacob [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.

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

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

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

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

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

14 years agoUse DECL/GET_WINDOWS_FUNCTION in a few more places in place of ad-hoc
jacob [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().

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

14 years agoMove the two existing DECL/GET_foo_FUNCTION macro sets used for dynamic
jacob [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).

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

14 years agoImprove buffer handling in Windows sk_getaddr() -- we were passing
jacob [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).

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

14 years agoStop trying to enumerate all the kinds of Windows we support on the download
jacob [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.

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

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

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

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

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

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

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

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

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

14 years agoChange manifest files to declare Windows GUI apps to be "DPI-aware", that is,
jacob [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.)

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

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

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

14 years agoSince r7266, it's been possible to get a hostname into Default Settings; but
jacob [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.

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

14 years agoIn Unix PuTTY, grey out "Restart Session" when it doesn't apply (as the Windows
jacob [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.

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

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

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

14 years agoIf there are no saved sessions, put a grayed "(No sessions)" entry on the saved
jacob [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).

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

14 years agoAvoid compiling autoconf test programs with -Wall -Werror; doing so causes
jacob [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>.

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

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

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

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

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

14 years agoFrom Corey Stup: when we're declaring stuff for WSAAddressToStringA, we should
jacob [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.)

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

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

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

14 years agoCorey Stup points out that any attempt to display the message "Unable to load
jacob [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.

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

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

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

14 years agoFix handling of duplicate port forwardings; they were effectively cancelling
jacob [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".)

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

14 years agoQuell "config.status: WARNING: Makefile.in seems to ignore the --datarootdir
jacob [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>

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

14 years agoKeep the state of the "Full Screen" menu item on the Ctrl+right-click context
jacob [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.

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

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

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

14 years agoPatch from Alan Clucas (somewhat polished) providing command-line
simon [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.

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

14 years agoFixes for re-entrant calls in the serial configuration list boxes.
simon [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.)

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

14 years agoWorkarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which
jacob [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).

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

14 years agoMore use of sockaddr_union (above and beyond that necessary to remove current
jacob [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).

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

14 years agoAvoid "dereferencing pointer 'sa' does break strict-aliasing rules" warnings
jacob [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.

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

14 years agoAlex Besogonov suggests that our Unix autoconf GSSAPI library search order is
jacob [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.

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

14 years agoMention Makefile.ux.
jacob [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.

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

14 years agoInclude putty.h (and hence uxconfig.h) before testing for NO_GSSAPI, so that
jacob [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.

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

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

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