]> asedeno.scripts.mit.edu Git - PuTTY.git/log
PuTTY.git
13 years agoSupport for using variable-pitch fonts for the terminal on Windows.
Simon Tatham [Wed, 29 Dec 2010 14:11:25 +0000 (14:11 +0000)]
Support for using variable-pitch fonts for the terminal on Windows.

Done in much the same way as it is in the GTK front end: the character
cell width is determined using the font's digits (which seems to give
generally not-too-offensive spacing in most cases, at the expense of
Ms and Ws typically overhanging a bit into adjacent cells) and each
character is centred in its cell. Overhangs never leave permanent
droppings on the window, because the existing work done in r5003
handles them just fine even in this stressful scenario.

There's a hacky new checkbox in the Appearance panel to make
variable-pitch fonts appear in the font selector (they still don't by
default, because I still think it's _usually_ not What You Want); the
checkbox state is not actually stored as part of a saved session, but
it should be automatically ticked when reloading a session that's got
a variable pitch font selected.

(I'm half-expecting a potential flurry of requests for this feature in
the wake of http://xkcd.com/840/ , so I thought I'd pre-empt them :-)

[originally from svn r9063]
[r5003 == ba470dec5e37ffbde05425f48e7e9a64219aec2e]

13 years agoVyacheslav Andrejev points out a heap management goof in the new jump
Simon Tatham [Wed, 29 Dec 2010 13:35:44 +0000 (13:35 +0000)]
Vyacheslav Andrejev points out a heap management goof in the new jump
list code. Free the old value of the pointer variable we just
overwrote, not the new one!

[originally from svn r9062]

13 years agoThou shalt not suffer a misplaced apostrophe to live.
Simon Tatham [Wed, 29 Dec 2010 11:57:04 +0000 (11:57 +0000)]
Thou shalt not suffer a misplaced apostrophe to live.

[originally from svn r9061]

13 years agoFix resize handling when enabling and disabling full-screen mode.
Simon Tatham [Mon, 27 Dec 2010 12:58:39 +0000 (12:58 +0000)]
Fix resize handling when enabling and disabling full-screen mode.

I'm not sure whether I broke this in the recent revamp or whether it
was always broken, but: transitions in and out of full-screen mode
work by first maximising or restoring the window, which triggers a
WM_SIZE, whose handler then fiddles with the window style to disable
or re-enable all the furniture, which in turn triggers a recursive
WM_SIZE. The trouble is, after returning from the handler for the
inner WM_SIZE, the rest of the outer handler runs, and its client area
size is now out of date.

So I've added a flag which is set when a resize is handled 'properly',
so that after returning from the inner WM_SIZE handler the outer one
knows not to try to redo badly work that's already been done well.

[originally from svn r9056]

13 years agoAdd an option to disable SSH-2 banners.
Jacob Nevins [Mon, 27 Dec 2010 01:19:13 +0000 (01:19 +0000)]
Add an option to disable SSH-2 banners.

[originally from svn r9055]

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

[originally from svn r9054]

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

[originally from svn r9053]

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

[originally from svn r9050]

13 years agoOptionally define PropVariantInit() locally to restore ability to build with
Jacob Nevins [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).

[originally from svn r9049]
[r9046 == 1a03fa9292f2258384d037994d8e8e119ac11458]

13 years agoDocument the behaviour of Alt in the "hybrid" resizing mode alluded to in
Jacob Nevins [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.

[originally from svn r9047]
[r9045 == 6cd24c839d7f9b96b375e12560b254a1a9013dbf]

13 years agoSupport for Windows 7 jump lists (right-click on a program's taskbar
Simon Tatham [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...

[originally from svn r9046]

13 years agoThe special treatment of Alt-resize (to cause resizing to affect the
Simon Tatham [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.

[originally from svn r9045]

13 years agoAnother fix to yesterday's window-resizing revamp: when restoring from
Simon Tatham [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.

[originally from svn r9044]

13 years agoMore careful owner SID selection in the Pageant client code. This
Simon Tatham [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.

[originally from svn r9043]

13 years agoPay attention to the width and height provided in WM_SIZE even when
Simon Tatham [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.

[originally from svn r9041]

13 years agoReorganise handling of WM_SIZE to fix two generality problems.
Simon Tatham [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.

[originally from svn r9040]

13 years agoProtect against a (non-security-related) buffer overrun if PuTTY is
Simon Tatham [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.

[originally from svn r9039]

13 years agoAdd an 'XLFLAGS' make variable to Makefile.vc, permitting user-
Simon Tatham [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.

[originally from svn r9038]

13 years agoAdd more possible baud rates to the Unix serial backend. These are the
Jacob Nevins [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.

[originally from svn r9028]

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

[originally from svn r9027]

13 years agoDavid Laight reports that sometimes reads on a serial port will
Simon Tatham [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.

[originally from svn r9020]

13 years agoBah, r9008 caused an assertion failure on Windows due to a clash with the
Jacob Nevins [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.

[originally from svn r9010]
[r9008 == 5981b5e99d30effebe2ce2f7fd5a57d0eba15381]

13 years agoAdd index terms for GSSAPI stuff. Mention GSSAPI in "use system username"
Jacob Nevins [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.

[originally from svn r9009]

13 years agoSince GSSAPI is now on its own panel, we may as well have a full set of
Jacob Nevins [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.

[originally from svn r9008]

13 years agoOops: r9004 should have removed various pieces from the Makefile and
Simon Tatham [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.

[originally from svn r9005]
[r9004 == 7ac1f17aab27c5b20d41e325841eecf388929dec]

13 years agoRetire the old Mac Classic port directory! It's been unused for
Simon Tatham [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.

[originally from svn r9004]

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]