u/mdw/putty
11 years agoFix a bug in cygtermd, spotted by Casey Zacek, in which we
simon [Fri, 1 Jun 2012 06:50:37 +0000 (06:50 +0000)]
Fix a bug in cygtermd, spotted by Casey Zacek, in which we
unconditionally set the telnet state to SEENCR regardless of whether
we have actually seen a CR, and as a result sending a NUL through
PuTTY (via Ctrl-Space or whatever) does not work. Must have arisen
through some kind of really weird cut-and-paste error!

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

11 years agoEnhance my 'sresize' macro so that it type-checks the pointer you pass
simon [Fri, 18 May 2012 19:51:11 +0000 (19:51 +0000)]
Enhance my 'sresize' macro so that it type-checks the pointer you pass
_in_ to it, as well as the one it returns. Why have I never thought of
doing that before?!

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

11 years agoFix bug in the new CLOCK_MONOTONIC implementation. I was treating the
simon [Tue, 15 May 2012 22:19:21 +0000 (22:19 +0000)]
Fix bug in the new CLOCK_MONOTONIC implementation. I was treating the
nanoseconds field as a microseconds field, with hilarious consequences.

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

11 years agoUse clock_gettime(CLOCK_MONOTONIC) as the Unix getticks(), if it's
simon [Sun, 13 May 2012 15:59:27 +0000 (15:59 +0000)]
Use clock_gettime(CLOCK_MONOTONIC) as the Unix getticks(), if it's
available.

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

11 years agoPatch from Robert de Bath to substantially simplify timing.c.
simon [Sun, 13 May 2012 15:59:26 +0000 (15:59 +0000)]
Patch from Robert de Bath to substantially simplify timing.c.

The previous platform-dependent ifdefs, switching between a system
which tried to cope with spurious callbacks (which I'd observed on
Windows) and one which tried to cope with system clock jumps (which
can happen on Unix, if you use gettimeofday) have been completely
removed, and replaced with a much simpler approach which just copes
with system clock jumps by triggering any timers immediately.

None of the resulting effects should be catastrophic (the worst thing
might be the waste of CPU in a spurious rekey, but as long as the
system clock isn't jumping around _all_ the time that's hardly
critical) and in any case the Unix port has had a long-standing oddity
involving occasional lockups if pterm or PuTTY runs for too long,
which hopefully this should replace with a much less bad failure mode.
And the code is much simpler, which is not to be sneezed at.

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

11 years agoFix from Robert de Bath which reorders the Windows initialisation
simon [Sun, 13 May 2012 15:59:24 +0000 (15:59 +0000)]
Fix from Robert de Bath which reorders the Windows initialisation
sequence: since init_fonts sets up ucsdata based on the available
Windows fonts, we should call it before passing ucsdata to term_init.

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

11 years agoBug fix from Robert de Bath: since lpDx_maybe is always supposed to
simon [Sun, 13 May 2012 15:59:22 +0000 (15:59 +0000)]
Bug fix from Robert de Bath: since lpDx_maybe is always supposed to
equal either lpDx or NULL, we mustn't forget to update it when we
realloc lpDx.

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

11 years agoWhen we are asked to unthrottle an SSH connection (by the front end
simon [Sat, 12 May 2012 17:00:54 +0000 (17:00 +0000)]
When we are asked to unthrottle an SSH connection (by the front end
calling back->unthrottle), we should immediately call
ssh_process_queued_incoming_data to handle the SSH packets that have
been saved for later functioning while we were throttled. Otherwise,
they'll sit there unhandled until the next call to ssh_gotdata, which
might not be for ages if the server thinks it's waiting for us.

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

12 years agoFix trivial Perl goof in logparse.pl which caused
simon [Mon, 30 Apr 2012 17:28:28 +0000 (17:28 +0000)]
Fix trivial Perl goof in logparse.pl which caused
SSH2_MSG_CHANNEL_FAILURE to be reported as replying to
ARRAY(0xrubbish) instead of to a message number.

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

12 years agoFix an inverted comparison in rlogin.c which must surely have broken
simon [Tue, 24 Apr 2012 17:33:06 +0000 (17:33 +0000)]
Fix an inverted comparison in rlogin.c which must surely have broken
logins completely, with or without a supplied username. Ahem.

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

12 years agoCall sshfwd_unclean_close() in the event of a local socket error on a
simon [Mon, 23 Apr 2012 17:59:53 +0000 (17:59 +0000)]
Call sshfwd_unclean_close() in the event of a local socket error on a
forwarded X connection. (I somehow forgot to do this in r9364, despite
making the identical change in portfwd.c.)

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

12 years agoPatch from Robert de Bath to ifdef out the Windows-specific hack for
simon [Sun, 22 Apr 2012 14:22:10 +0000 (14:22 +0000)]
Patch from Robert de Bath to ifdef out the Windows-specific hack for
the offset horizontal line characters in the VT100 line-drawing set
(o,p,r,s), so that no trace of it - and hence no pointless performance
hit - is compiled into the cross-platform modules on non-Windows
platforms.

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

12 years agoBug fix from Robert de Bath: if the utf8_override setting is changed
simon [Sun, 22 Apr 2012 14:22:08 +0000 (14:22 +0000)]
Bug fix from Robert de Bath: if the utf8_override setting is changed
in mid-session, it affects translation and hence display, so it should
be listed among the settings that require a redraw.

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

12 years agoBug fix from Robert de Bath: if wc_to_mb returns a length of zero, it
simon [Sun, 22 Apr 2012 14:22:08 +0000 (14:22 +0000)]
Bug fix from Robert de Bath: if wc_to_mb returns a length of zero, it
will not even initialise sbstring[0], so we shouldn't even look at it
let alone depend on it to tell us the desired character was absent.

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

12 years agoConditionalise the calls to premsg and postmsg in uxcons.c's
simon [Wed, 18 Apr 2012 06:36:46 +0000 (06:36 +0000)]
Conditionalise the calls to premsg and postmsg in uxcons.c's
logevent(), which temporarily turn off the raw mode we've put stderr
into, so that they don't get called if the log_eventlog() call between
them is not _actually_ going to write to stderr.

Fixes a bug in which, if you define a Unix PuTTY saved session which
uses 'plink -nc' as a local proxy command and then run PuTTY
backgrounded from the shell with that session loaded, the subprocess
Plink would get SIGTTOU when it tried to muck about with stderr and
the whole thing would grind to a halt. I'm prepared to consider that
acceptable if Plink _really_ wants to write on standard error, but if
it doesn't, it should just carry on working in the background!

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

12 years agoFix a Perl warning about useless use of a constant in void context.
simon [Mon, 16 Apr 2012 18:21:31 +0000 (18:21 +0000)]
Fix a Perl warning about useless use of a constant in void context.

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

12 years agoNew utility script to parse an SSH packet dump and write out an
simon [Sat, 14 Apr 2012 17:24:12 +0000 (17:24 +0000)]
New utility script to parse an SSH packet dump and write out an
interpretation with some analysis done on it. The script will do its
own tracking of the set of open channels and their states, and its
output is in a one-line-per-packet format such that every distinct
channel has a unique identifier in it which should make it easy to
grep out all lines relating to that channel. The script also matches
up {CHANNEL,REQUEST}_{SUCCESS,FAILURE} to the requests that caused
them, by tracking a queue of requests in each direction per channel
and for global requests. Command-line options permit generating a
final dump of all channels ever known to the script and their various
ids and final state, and also dumping out the data transferred over
each channel in each direction.

Output is not complete, in the sense that some parameters in some
messages (e.g. pixel sizes in window-size specifications) are
deliberately omitted due to being boring, and the entire contents of
some messages (e.g. KEXINIT) are omitted because I haven't yet seen
any purpose in decoding them. Filling them in might be a useful thing,
although I'm inclined to think that the default should still be to
show only the potentially interesting stuff (e.g. still not pixel
sizes!) and enable the rest using a -v option.

Hopefully this should do a lot of the legwork in debugging issues in
which a channel mysteriously remains partially open and prevents PuTTY
closing.

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

12 years agoAdd code in dlg_filesel_set and dlg_fontsel_set which makes them
simon [Fri, 13 Apr 2012 18:02:30 +0000 (18:02 +0000)]
Add code in dlg_filesel_set and dlg_fontsel_set which makes them
duplicate the strings they pass to gtk_entry_set_text. I was already
doing that in dlg_editbox_set, but forgot to add the same code when I
revamped FontSpec and Filename to contain dynamically allocated
strings (r9314 and r9316 respectively). This fixes a bug where, on
some versions of GTK (but apparently not up-to-date versions), loading
a saved session causes gibberish to appear in file-selector edit boxes
accompanied by a valgrind error.

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

12 years agoFallout from the big revamp in r9214: colour handling was going a bit
simon [Sun, 8 Apr 2012 09:42:58 +0000 (09:42 +0000)]
Fallout from the big revamp in r9214: colour handling was going a bit
wonky because I'd used the subkey for the red component in four places
where I should have used the green/blue subkeys instead. Thanks to
Martin Kletzander for spotting it.

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

12 years agoFix another type mismatch introduced by r9409.
simon [Mon, 5 Mar 2012 18:40:36 +0000 (18:40 +0000)]
Fix another type mismatch introduced by r9409.

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

12 years agoFix a type mismatch in minibidi.c - r9409 changed the 'wc' fields in
simon [Mon, 5 Mar 2012 18:34:40 +0000 (18:34 +0000)]
Fix a type mismatch in minibidi.c - r9409 changed the 'wc' fields in
bidi_char from wchar_t to unsigned int, but omitted to similarly
adjust the parameter to doMirror which is passed a pointer to that
field.

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

12 years agoInitialise some variables to NULL, to placate optimisers.
simon [Mon, 5 Mar 2012 18:32:27 +0000 (18:32 +0000)]
Initialise some variables to NULL, to placate optimisers.

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

12 years agoRemove comment about 1024/1023 RSA key lengths that's no longer true as of
jacob [Sun, 4 Mar 2012 01:01:11 +0000 (01:01 +0000)]
Remove comment about 1024/1023 RSA key lengths that's no longer true as of
r9421.

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

12 years agoGenerate keys more carefully, so that when the user asks for an n-bit
simon [Sun, 4 Mar 2012 00:24:49 +0000 (00:24 +0000)]
Generate keys more carefully, so that when the user asks for an n-bit
key they always get an n-bit number instead of n-1. The latter was
perfectly harmless but kept confusing users.

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

12 years agoLong overdue rewrapping of the primes[] array for legibility. I think
simon [Sun, 4 Mar 2012 00:24:47 +0000 (00:24 +0000)]
Long overdue rewrapping of the primes[] array for legibility. I think
the previous ghastly formatting arose when I ran the whole source base
through GNU indent...

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

12 years agoUpdate default key length in PuTTYgen to 2048.
simon [Sun, 19 Feb 2012 10:44:04 +0000 (10:44 +0000)]
Update default key length in PuTTYgen to 2048.

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

12 years agoUpdate to 2007-05-26 version of upstream wcwidth.c.
simon [Sun, 19 Feb 2012 10:32:44 +0000 (10:32 +0000)]
Update to 2007-05-26 version of upstream wcwidth.c.

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

12 years agoPatch from Matsui Nag to implement xterm's "bracketed paste mode", in
simon [Sun, 19 Feb 2012 10:27:18 +0000 (10:27 +0000)]
Patch from Matsui Nag to implement xterm's "bracketed paste mode", in
which text pasted into the terminal is preceded and followed by
special function-key-like escape sequences ESC[200~ and ESC[201~ so
that the application can identify it and treat it specially (e.g.
disabling auto-indent-same-as-previous-line in text editors). Enabled
and disabled by ESC[?2004h and ESC[?2004l, and of course off by
default.

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

12 years agoPatch from Yoshida Masato to fill in the missing pieces of Windows
simon [Fri, 17 Feb 2012 19:28:55 +0000 (19:28 +0000)]
Patch from Yoshida Masato to fill in the missing pieces of Windows
UTF-16 support. High Unicode characters in the terminal are now
converted back into surrogates during copy and draw operations, and
the Windows drawing code takes account of that when splitting up the
UTF-16 string for display. Meanwhile, accidental uses of wchar_t have
been replaced with 32-bit integers in parts of the cross-platform code
which were expecting not to have to deal with UTF-16.

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

12 years agoWM_SIZE/SIZE_MAXIMIZED can show up even during an interactive resize,
simon [Sun, 5 Feb 2012 10:08:20 +0000 (10:08 +0000)]
WM_SIZE/SIZE_MAXIMIZED can show up even during an interactive resize,
so we should ensure we treat it the same way as other WM_SIZEs that
show up during that time: set the width and height in conf, and set
the flag to have that width and height enacted on WM_EXITSIZEMOVE.

Fixes a bug in which dragging a PuTTY window directly from the Win7
snapped-to-half-screen position to the snapped-to-maximised state
would leave the terminal in the pre-snapped size.

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

12 years agoNew FAQ: "When I put PuTTY in C:\WINDOWS\SYSTEM32 on my 64-bit Windows system,
jacob [Mon, 30 Jan 2012 00:29:32 +0000 (00:29 +0000)]
New FAQ: "When I put PuTTY in C:\WINDOWS\SYSTEM32 on my 64-bit Windows system,
`Duplicate Session' doesn't work." (Explanation courtesy Owen.)

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

12 years agoIt's a new year.
jacob [Thu, 26 Jan 2012 18:53:53 +0000 (18:53 +0000)]
It's a new year.

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

12 years agoIf we're called on to uncleanly close an SSH channel for which we've
simon [Thu, 26 Jan 2012 18:22:28 +0000 (18:22 +0000)]
If we're called on to uncleanly close an SSH channel for which we've
already sent SSH2_MSG_CHANNEL_CLOSE, we should not skip the _whole_ of
sshfwd_unclean_close(), only the part about sending
SSH2_MSG_CHANNEL_CLOSE. It's still important to retag the SSH channel
as CHAN_ZOMBIE and clean up its previous data provider.

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

12 years agoPatch from Colin Watson to use g_ascii_strcasecmp in place of the
simon [Tue, 3 Jan 2012 19:43:19 +0000 (19:43 +0000)]
Patch from Colin Watson to use g_ascii_strcasecmp in place of the
deprecated g_strcasecmp (since all the strings being compared are
parts of XLFDs and won't be in interesting character sets anyway).

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

12 years agoChecklist update following the 0.62 release. I managed to send out the
simon [Sat, 10 Dec 2011 14:03:02 +0000 (14:03 +0000)]
Checklist update following the 0.62 release. I managed to send out the
announcement email without a subject line, so I'm reorganising the
announcement entry in the checklist in the hope that it'll make it
harder for me to get that one wrong in future!

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

12 years agoBump version number on trunk prior to tagging 0.62 on the branch.
simon [Sat, 10 Dec 2011 12:07:46 +0000 (12:07 +0000)]
Bump version number on trunk prior to tagging 0.62 on the branch.

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

12 years agoIntroduce a function sshfwd_unclean_close(), supplied by ssh.c to
simon [Thu, 8 Dec 2011 19:15:58 +0000 (19:15 +0000)]
Introduce a function sshfwd_unclean_close(), supplied by ssh.c to
subsidiary network modules like portfwd.c. To be called when the
subsidiary module experiences a socket error: it sends an emergency
CHANNEL_CLOSE (not just outgoing CHANNEL_EOF), and immediately deletes
the local side of the channel. (I've invented a new channel type in
ssh.c called CHAN_ZOMBIE, for channels whose original local side has
already been thrown away and they're just hanging around waiting to
receive the acknowledging CHANNEL_CLOSE.)

As a result of this and the last few commits, I can now run a port
forwarding session in which a local socket error occurs on a forwarded
port, and PuTTY now handles it apparently correctly, closing both the
SSH channel and the local socket and then actually recognising that
it's OK to terminate when all _other_ channels have been closed.
Previously the channel corresponding to the duff connection would
linger around (because of net_pending_errors never being called), and
keep being selected on (hence chewing CPU), and inhibit program
termination at the end of the session (because not all channels were
closed).

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

12 years agoArrange to call net_pending_errors on Unix, which we've never actually
simon [Thu, 8 Dec 2011 19:15:57 +0000 (19:15 +0000)]
Arrange to call net_pending_errors on Unix, which we've never actually
remembered to do before! Also some related fixes, such as that after
we do so we should immediately stop selecting on the socket in
question.

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

12 years agoWhen we receive CHANNEL_CLOSE on an SSH-2 channel and haven't sent EOF
simon [Thu, 8 Dec 2011 19:15:55 +0000 (19:15 +0000)]
When we receive CHANNEL_CLOSE on an SSH-2 channel and haven't sent EOF
on it yet, we should send EOF on _that channel_, not the main session
channel! Oops.

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

12 years agoWhitespace fix while I was passing.
simon [Thu, 8 Dec 2011 19:15:54 +0000 (19:15 +0000)]
Whitespace fix while I was passing.

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

12 years agoMake sure we never send window adjustments (or winadjes) on channels
simon [Thu, 8 Dec 2011 19:15:53 +0000 (19:15 +0000)]
Make sure we never send window adjustments (or winadjes) on channels
for which we've already sent CHANNEL_CLOSE. It would be embarrassing
if the remote end had also sent CHANNEL_CLOSE in response and then
received our communication once it had forgotten about the channel.

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

12 years agoBlock SIGPIPE in Unix plink. In a port-forwarding run we may have lots
simon [Thu, 8 Dec 2011 19:15:52 +0000 (19:15 +0000)]
Block SIGPIPE in Unix plink. In a port-forwarding run we may have lots
of local sockets and pipes all open at once, and if one of them is
uncleanly closed from the remote end we don't want the whole
application to die - we want to close that socket's SSH channel and
continue with the rest of the run.

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

12 years agoAdd a missing free_prompts() call in the keyboard-interactive code.
simon [Wed, 7 Dec 2011 19:07:02 +0000 (19:07 +0000)]
Add a missing free_prompts() call in the keyboard-interactive code.

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

12 years agoTiny patch from Martin Packman to fix a Windows handle leak in
simon [Mon, 28 Nov 2011 19:23:43 +0000 (19:23 +0000)]
Tiny patch from Martin Packman to fix a Windows handle leak in
Pageant's IPC mechanism. It's incomplete (he sent a much more
comprehensive set of fixes that I haven't reviewed), but should be
adequate to mitigate a particular issue for Bazaar users.

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

12 years agoI missed a bit in r9343: windows/version.rc2 also needed updating for
simon [Mon, 28 Nov 2011 19:17:04 +0000 (19:17 +0000)]
I missed a bit in r9343: windows/version.rc2 also needed updating for
the new 'pre-release' version type.

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

12 years agoAdd a release checklist entry to remind me to get rid of 'pre-release'
simon [Sun, 27 Nov 2011 11:10:15 +0000 (11:10 +0000)]
Add a release checklist entry to remind me to get rid of 'pre-release'
sections on the Download page.

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

12 years agoIntroduce a new version type, 'prerelease'. Quotes the version number
simon [Sat, 26 Nov 2011 17:35:21 +0000 (17:35 +0000)]
Introduce a new version type, 'prerelease'. Quotes the version number
it's a pre-release of, and the revision number so you can tell two
pre-releases apart. I intend to use this for builds from branch-0.61
until I call it 0.62 proper.

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

12 years agoSupport code page 852. Thanks to Tamas Tevesz.
simon [Fri, 14 Oct 2011 07:03:29 +0000 (07:03 +0000)]
Support code page 852. Thanks to Tamas Tevesz.

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

12 years agoPrivate files saved on Unix should have mode 0600, not 0700. They're
simon [Sun, 2 Oct 2011 14:16:08 +0000 (14:16 +0000)]
Private files saved on Unix should have mode 0600, not 0700. They're
generally private-key files, which have no need to be executable.

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

12 years agoMore arbitrary-limit hunting: retire PASSPHRASE_MAXLEN in the Windows
simon [Sun, 2 Oct 2011 14:14:21 +0000 (14:14 +0000)]
More arbitrary-limit hunting: retire PASSPHRASE_MAXLEN in the Windows
GUIs of Pageant and PuTTYgen. With that and the prompts_t redesign,
there should no longer be any limit on passphrase length other than
the patience of the user.

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

12 years agoAnother utility function, to free a string containing sensitive data.
simon [Sun, 2 Oct 2011 14:03:47 +0000 (14:03 +0000)]
Another utility function, to free a string containing sensitive data.

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

12 years agoMove a recently introduced utility function out of the file in which I
simon [Sun, 2 Oct 2011 13:53:58 +0000 (13:53 +0000)]
Move a recently introduced utility function out of the file in which I
declared it static, and into winutils.c where it can be more generally
accessible.

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

12 years agoWhile I'm crusading against arbitrary limits, here's a redesign of
simon [Sun, 2 Oct 2011 11:50:45 +0000 (11:50 +0000)]
While I'm crusading against arbitrary limits, here's a redesign of
prompt_t to arrange that the buffer in which each prompt is stored can
be reallocated larger during the input process.

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

12 years agoTurn 'Filename' into a dynamically allocated type with no arbitrary
simon [Sun, 2 Oct 2011 11:01:57 +0000 (11:01 +0000)]
Turn 'Filename' into a dynamically allocated type with no arbitrary
length limit, just as I did to FontSpec yesterday.

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

12 years agoFix copy-and-paste error in command-line font selection in r9314.
jacob [Sat, 1 Oct 2011 18:00:49 +0000 (18:00 +0000)]
Fix copy-and-paste error in command-line font selection in r9314.

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

12 years agoChange the semantics of 'FontSpec' so that it's a dynamically
simon [Sat, 1 Oct 2011 17:38:59 +0000 (17:38 +0000)]
Change the semantics of 'FontSpec' so that it's a dynamically
allocated type.

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

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

12 years agoWe shouldn't fork off a utmp helper subprocess when we aren't setuid,
simon [Mon, 19 Sep 2011 16:38:23 +0000 (16:38 +0000)]
We shouldn't fork off a utmp helper subprocess when we aren't setuid,
because (a) under that circumstance we won't be writing to utmp
anyway, and (b) if we aren't setuid, then we won't have created the
pty at the point we fork, so even if our subprocess _could_ have
written to utmp it wouldn't have done it right!

Spotted by valgrind (triggering on the access beyond the end of the
ttyname string in setup_utmp, clueing me in to it having been empty).

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

12 years agoAdd a missing initialisation to NULL.
simon [Mon, 19 Sep 2011 16:21:25 +0000 (16:21 +0000)]
Add a missing initialisation to NULL.

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

12 years agoCope with XFontStructs having a NULL per_char array, which happened to
simon [Sat, 17 Sep 2011 14:50:18 +0000 (14:50 +0000)]
Cope with XFontStructs having a NULL per_char array, which happened to
me this morning under strange circumstances.

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

12 years agoFix x11font_has_glyph so it doesn't get caught out by signed chars.
simon [Sat, 17 Sep 2011 08:11:11 +0000 (08:11 +0000)]
Fix x11font_has_glyph so it doesn't get caught out by signed chars.

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

12 years agoSuppress Pango's bidi, by displaying RTL characters one at a time. I
simon [Fri, 16 Sep 2011 19:18:58 +0000 (19:18 +0000)]
Suppress Pango's bidi, by displaying RTL characters one at a time. I
hadn't previously noticed, but Pango was helpfully re-reversing text
that PuTTY's own bidi module had already reversed, leading to Arabic
text being wrongly displayed and also total chaos when you move the
cursor over it or try to cut and paste it.

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

12 years agoSupport font fallback even when an X11 server-side font is selected,
simon [Fri, 16 Sep 2011 19:18:54 +0000 (19:18 +0000)]
Support font fallback even when an X11 server-side font is selected,
by introducing a wrapper around an individual unifont which falls back
to Pango (which already has built-in fallback) in the case where the
selected font doesn't support the glyph in question.

The wrapper itself is a (vestigial) subclass of unifont, to minimise
disturbance at the call sites.

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

12 years agoChange the unifont API so that text is passed right down to the
simon [Fri, 16 Sep 2011 19:18:53 +0000 (19:18 +0000)]
Change the unifont API so that text is passed right down to the
individual font implementation as wchar_t, rather than having to be
converted by the client into the appropriate MBCS/SBCS.

This also means I can remove 'real_charset' from the public-facing
contents of the unifont structure.

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

12 years agoAdd some missing consts in character set handling.
simon [Fri, 16 Sep 2011 19:18:52 +0000 (19:18 +0000)]
Add some missing consts in character set handling.

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

12 years agoRemove empty.h from CLEANFILES, so that after mkfiles.pl has
simon [Fri, 16 Sep 2011 09:01:41 +0000 (09:01 +0000)]
Remove empty.h from CLEANFILES, so that after mkfiles.pl has
constructed it it won't be deleted again by 'make clean'. The effect
is that not only does this work (as r9288 arranged),

  ./configure; make plink

but these work too:

  ./configure; make; make clean; make plink
  ./configure; make; make distclean; ./configure; make plink

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

12 years agoStop using GDK's wrapper on the X11 font functions (GdkFont). All X11
simon [Fri, 16 Sep 2011 08:49:08 +0000 (08:49 +0000)]
Stop using GDK's wrapper on the X11 font functions (GdkFont). All X11
font operations are now done directly using Xlib calls, and the only
interaction with GDK within the x11font mechanism is to get the X ids
for drawables, GCs and the X display itself.

This should remove an obstacle to porting to GTK3, and also makes the
XFontStruct for loaded fonts more readily available, which I hope will
come in handy for another plan I have in mind.

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

12 years agoCreate empty.h (used to force rebuilds of version.o by the automake
simon [Wed, 14 Sep 2011 15:54:26 +0000 (15:54 +0000)]
Create empty.h (used to force rebuilds of version.o by the automake
makefile) as a side effect of running mkfiles.pl.

The automake docs observe that the BUILT_SOURCES list is only
automatically built by plain 'make' or 'make all' or a couple of other
targets, so the sequence './configure && make plink' from a freshly
unpacked tar file would previously fail for lack of empty.h.

If empty.h had important _content_ that needed to be built at compile
time, of course, I wouldn't be able to fix it like this; but since the
only important thing is the timestamp, I can just make sure it already
exists at the time of first build.

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

12 years agoNo, I take that back: we _do_ have a mechanism for suppressing reads
simon [Wed, 14 Sep 2011 09:49:00 +0000 (09:49 +0000)]
No, I take that back: we _do_ have a mechanism for suppressing reads
from forwarding data sources which will be good enough to last until
we close the socket, in the form of the override_throttle() functions.
So this finishes up the work in r9283, by manufacturing outgoing EOF
in response to incoming CLOSE on all channel types.

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

12 years agoAnother tweak to EOF policy: invent an outgoing EOF on receipt of an
simon [Wed, 14 Sep 2011 09:09:35 +0000 (09:09 +0000)]
Another tweak to EOF policy: invent an outgoing EOF on receipt of an
incoming CHANNEL_CLOSE, if it's the main session channel. The idea is
that invocations such as 'plink -T hostname sh' (running a shell
without a remote pty) can be exited by typing 'exit' to the remote
shell, without plink blocking forever waiting for outgoing EOF.

I think it would be better to do the same for all other channel types
too, but that would need an extra API call which I haven't
implemented yet.

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

12 years agoChanged my mind about the EOF policy in SSH mode: I think the SSH
simon [Tue, 13 Sep 2011 15:38:12 +0000 (15:38 +0000)]
Changed my mind about the EOF policy in SSH mode: I think the SSH
backend should unilaterally assume outgoing EOF when it sees incoming
EOF, if and only if the main session channel is talking to a pty.
(Because ptys don't have a strong concept of EOF in the first place,
that seems like a sensible place to draw the line.) This fixes a bug
introduced by today's revamp in which if you used Unix Plink to run a
console session it would hang after you hit ^D - because the server
had sent EOF, but it was waiting for a client-side EOF too.

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

12 years agoNearly forgot noting this down in the 'half-closed' bug entry: don't
simon [Tue, 13 Sep 2011 11:56:25 +0000 (11:56 +0000)]
Nearly forgot noting this down in the 'half-closed' bug entry: don't
send CHANNEL_CLOSE until we have acks for all our winadj requests.
Should work around https://bugzilla.mindrot.org/show_bug.cgi?id=1818 .

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

12 years agoRevamp of EOF handling in all network connections, pipes and other
simon [Tue, 13 Sep 2011 11:44:03 +0000 (11:44 +0000)]
Revamp of EOF handling in all network connections, pipes and other
data channels. Should comprehensively fix 'half-closed', in principle,
though it's a big and complicated change and so there's a good chance
I've made at least one mistake somewhere.

All connections should now be rigorous about propagating end-of-file
(or end-of-data-stream, or socket shutdown, or whatever) independently
in both directions, except in frontends with no mechanism for sending
explicit EOF (e.g. interactive terminal windows) or backends which are
basically always used for interactive sessions so it's unlikely that
an application would be depending on independent EOF (telnet, rlogin).

EOF should now never accidentally be sent while there's still buffered
data to go out before it. (May help fix 'portfwd-corrupt', and also I
noticed recently that the ssh main session channel can accidentally
have MSG_EOF sent before the output bufchain is clear, leading to
embarrassment when it subsequently does send the output).

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

12 years agoIn term_init(), copy stuff out of the conf _before_ calling
simon [Tue, 13 Sep 2011 10:27:00 +0000 (10:27 +0000)]
In term_init(), copy stuff out of the conf _before_ calling
power_on(), since the latter calls term_schedule_cblink which expects
term->blink_cur to have been initialised.

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

12 years agoFix assertion failure in wprefs() when the list is zero-length. Breaks
simon [Tue, 13 Sep 2011 07:35:14 +0000 (07:35 +0000)]
Fix assertion failure in wprefs() when the list is zero-length. Breaks
any session-save operation in PuTTYtel due to the empty GSS list.

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

12 years agoInstead of testing for different versions of GTK in increasing order
simon [Sat, 20 Aug 2011 08:18:56 +0000 (08:18 +0000)]
Instead of testing for different versions of GTK in increasing order
of preference so that the later ones overwrite the configured stuff
from the older ones, test in decreasing order of preference and stop
as soon as one is successful. Fixes a problem in which
autoconfiguration on a system containing only GTK 1 would go wrong
because the _failed_ test for GTK 2 would overwrite some but not all
of the variables set by the successful test for v1.

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

12 years agoAdd a -U option to mkfiles.pl, which is just like -u except that it
simon [Sat, 20 Aug 2011 07:56:19 +0000 (07:56 +0000)]
Add a -U option to mkfiles.pl, which is just like -u except that it
runs configure at the top level rather than the unix subdirectory. I'm
getting into the idea of even doing it that way myself, because then I
can do VPATH builds from the same source tree elsewhere.

(Autoconf seems to be fine with doing multiple VPATH builds from the
same source tree in different build directories, but gets upset if you
try to do a VPATH build when you've done a normal build in the real
configure directory. So this way I do what autoconf sees as _only_
VPATH builds.)

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

12 years agoFix bug with setting window title on Unix that came in with r9214.
jacob [Fri, 19 Aug 2011 14:55:24 +0000 (14:55 +0000)]
Fix bug with setting window title on Unix that came in with r9214.

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

12 years agoFix a suspected bug in PSCP's SCP protocol fallback from r9214 (untested since
jacob [Thu, 18 Aug 2011 10:47:45 +0000 (10:47 +0000)]
Fix a suspected bug in PSCP's SCP protocol fallback from r9214 (untested since
I don't have access to a server that still needs this fallback).

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

12 years agoRestore data-bits options for "-sercfg" that were accidentally lost in r9214.
jacob [Thu, 18 Aug 2011 10:45:25 +0000 (10:45 +0000)]
Restore data-bits options for "-sercfg" that were accidentally lost in r9214.

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

12 years agoReadjust Pageant's SID check _again_, to make it the union of the
simon [Sat, 13 Aug 2011 14:48:36 +0000 (14:48 +0000)]
Readjust Pageant's SID check _again_, to make it the union of the
policies before and after r9178, and hence able to talk to both
0.60-like and 0.61-like clients.

I had failed to consider that many pieces of code derived from PuTTY
would have imported the Pageant client code, so we shouldn't randomly
stop supporting things just because _we_ aren't using them any more.

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

12 years agoUpdates to svn:ignore: ignore libversion.a in the top-level directory
simon [Fri, 12 Aug 2011 17:28:47 +0000 (17:28 +0000)]
Updates to svn:ignore: ignore libversion.a in the top-level directory
(for people doing their builds there), and ignore 'compile' in the
unix subdirectory (a dropping from autotools that I missed).

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

12 years agoIf we're printing password prompts to /dev/tty rather than standard
simon [Thu, 11 Aug 2011 18:13:34 +0000 (18:13 +0000)]
If we're printing password prompts to /dev/tty rather than standard
error, we should also read the corresponding password inputs from
/dev/tty. That way, redirection of Plink's standard input will play
nicely with SSH sessions that need interactive login.

(This is what we get for disdaining getpass(3) and going it alone, of
course. But we had no choice, due to the extra output part way through
keyboard-interactive.)

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

12 years agoPropagate file permissions in both directions in Unix pscp and psftp.
simon [Thu, 11 Aug 2011 17:59:30 +0000 (17:59 +0000)]
Propagate file permissions in both directions in Unix pscp and psftp.

I think I have to consider this to be a separate but related change to
the wishlist item 'pscp-filemodes'; that was written before the Unix
port existed, and referred to the ability to configure the permissions
used for files copied from Windows to Unix - which is still not done.

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

12 years agoFix bug in which the SSH-only tools (pscp, psftp) did not honour a
simon [Wed, 27 Jul 2011 18:43:16 +0000 (18:43 +0000)]
Fix bug in which the SSH-only tools (pscp, psftp) did not honour a
nonstandard port number when loading a saved session.

Occurs because those tools include be_none.c which defines no entries
in backends[] at all, as a result of which settings.c doesn't
recognise the word 'ssh' in the saved session's protocol field and
instead sets the protocol to something idiotic - which _then_ means
that when pscp.c forces the protocol to PROT_SSH, it also resets the
port number as it would when overriding a saved session specifying a
protocol other than SSH.

The immediate solution is to define a new be_ssh.c citing only
ssh_backend, and include that in the SSH-only tools. However, I wonder
if a better approach (perhaps when I redesign session loading and
saving) would be not to be so clever, and just have all the tools
contain a complete list of known protocol names for purposes of
understanding what's in the saved session data, and complain if you
try to use one they don't know how to actually speak.

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

12 years agoMake the top-level configure wrapper executable. (I thought I'd done
simon [Sat, 23 Jul 2011 12:10:14 +0000 (12:10 +0000)]
Make the top-level configure wrapper executable. (I thought I'd done
that in the last commit, but svn must have ignored the permissions.)

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

12 years agoAdd a convenience option to mkfiles.pl for Unix users. If you run
simon [Sat, 23 Jul 2011 11:58:37 +0000 (11:58 +0000)]
Add a convenience option to mkfiles.pl for Unix users. If you run
'mkfiles.pl -u', it will do its normal processing, then run mkauto.sh
to regenerate configure and Makefile.in, then run configure in the
Unix subdirectory to regenerate unix/Makefile. So it's a handy
one-stop shop for going all the way from a modified Recipe to the
end-product Unix makefile, if you're adding source files during
development.

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

12 years agoAdd a wrapper script called 'configure' at the top level, which runs
simon [Sat, 23 Jul 2011 11:40:26 +0000 (11:40 +0000)]
Add a wrapper script called 'configure' at the top level, which runs
the real configure script from the unix subdirectory, but with cwd
unchanged so that you end up doing a VPATH build in the top-level
source directory.

Should, ideally, placate the people who expect 'configure' to be at
the top level, while still letting _me_ keep all the Unix-specific
stuff in the Unix subdirectory.

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

12 years agoRename --with-gtk-version to --with-gtk, and support its negation
simon [Sat, 23 Jul 2011 11:36:25 +0000 (11:36 +0000)]
Rename --with-gtk-version to --with-gtk, and support its negation
--without-gtk as a means of manually overriding the makefile into one
building the command-line tools only (as it would if GTK were not
found at all at configure time).

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

12 years agoSwitch to using automake for the Unix autoconfigured build.
simon [Sat, 23 Jul 2011 11:33:29 +0000 (11:33 +0000)]
Switch to using automake for the Unix autoconfigured build.

mkfiles.pl no longer generates a Makefile.in, but instead generates a
Makefile.am on which mkauto.sh runs automake. This means that the
autoconfigured makefile now does build-time dependency tracking (a
standard feature of automake-generated makefiles), and is generally
more like what Unix people will expect.

Some of the old-style make command-line settings (VER=-DRELEASE=foo,
XFLAGS=-DDEBUG) will still work; the COMPAT settings are better done
by autoconfiguration, and my habitual 'XFLAGS="-g -O0"' for an easily
debuggable build will actually not work any more because CFLAGS is
specified _after_ XFLAGS, so I should instead write 'make CFLAGS=-O0'
(-g is the default in automake, removed at 'make install' time).

The new makefile will automatically degrade into one that builds the
command-line tools only, in the case where GTK could not be found. In
principle, therefore, it should be an adequate replacement for _both_
the static Unix makefiles, Makefile.gtk and Makefile.ux. I haven't
actually retired those in this commit, but I'm pretty tempted.

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

12 years agoWhen we check for libX11 in the autoconf script, add it to $GTK_LIBS
simon [Wed, 20 Jul 2011 17:50:02 +0000 (17:50 +0000)]
When we check for libX11 in the autoconf script, add it to $GTK_LIBS
on success rather than to $LIBS, because it's only used in the GUI
tools and we don't want the command-line tools linked against it.

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

12 years agoFix 'Duplicate Session' on Windows, broken during the config revamp.
simon [Wed, 20 Jul 2011 15:55:07 +0000 (15:55 +0000)]
Fix 'Duplicate Session' on Windows, broken during the config revamp.

(In an embarrassingly silly way, too. No end of difficult stuff about
Conf serialisation done with great care and working just fine, and
then a trivial goof in using sscanf lets the whole lot down.)

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

12 years agoTrivial fix for assertion failure introduced by the config revamp.
simon [Tue, 19 Jul 2011 17:06:43 +0000 (17:06 +0000)]
Trivial fix for assertion failure introduced by the config revamp.
Spotted by Leonid Lisovskiy.

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

12 years agoMinor amendment to r9226: don't log GSSAPI failure in the Event Log
simon [Mon, 18 Jul 2011 18:09:36 +0000 (18:09 +0000)]
Minor amendment to r9226: don't log GSSAPI failure in the Event Log
twice. (Once in the GSSAPI code, once at the top of the main auth
loop. Removed the latter.)

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

12 years agoReinstate a missing invocation of the FONT_QUALITY macro which I
simon [Mon, 18 Jul 2011 18:04:39 +0000 (18:04 +0000)]
Reinstate a missing invocation of the FONT_QUALITY macro which I
accidentally removed in the big config revamp.

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

12 years agoFix a typo in r9214 that plausibly explains a resizing weirdness I had with
jacob [Sun, 17 Jul 2011 22:35:08 +0000 (22:35 +0000)]
Fix a typo in r9214 that plausibly explains a resizing weirdness I had with
today's snapshot on Windows.

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

12 years agoFix version reporting in Unix builds versioned by a specific svn
simon [Sun, 17 Jul 2011 22:17:53 +0000 (22:17 +0000)]
Fix version reporting in Unix builds versioned by a specific svn
revision ('Custom build r1234'). Those builds were passing
'-DSVN_REV=r1234' to version.c, instead of -DSVN_REV=1234 as they
should have, leading to silly run-time version messages such as
'plink: Custom build rr9226'.

To chop the r off the front of the revision string passed in, I've
used a bashism in mkunxarc.sh. I think this is an acceptable extra
dependency.

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

12 years ago--with-gtk-version option to configure, so you can explicitly tell it
simon [Sun, 17 Jul 2011 22:17:40 +0000 (22:17 +0000)]
--with-gtk-version option to configure, so you can explicitly tell it
which GTK version you want to build with if both are installed. Based
on a patch by Malcolm Smith, though somewhat modified.

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

12 years agoSupport for re-running autoconf in the absence of the autoconf macro
simon [Sun, 17 Jul 2011 22:17:30 +0000 (22:17 +0000)]
Support for re-running autoconf in the absence of the autoconf macro
files which provide auto-detection of GTK 1 and GTK 2. This makes it
easier for casual PuTTY developers to rerun autoconf for their own
purposes without having to install obscure extra packages. Obviously
the resulting configure script will not know how to detect whichever
version of GTK they didn't have support for, so it won't be product-
quality by my standards, but it should be good enough that they can
prepare unrelated patches to send to us.

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

12 years agoReorganise the logging and display of messages about SSH
simon [Sat, 16 Jul 2011 12:06:32 +0000 (12:06 +0000)]
Reorganise the logging and display of messages about SSH
authentication. We should now produce an Event Log entry for every
authentication attempted and every authentication failure; meanwhile,
messages in the PuTTY window will not be generated for the failure of
auth types unless we also announced in the PuTTY window that we were
trying them. (GSSAPI was getting the latter wrong, leading to spurious
'Access denied' for many users of 0.61.)

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

12 years agoMostly cosmetic change: don't claim to have found an SSH agent if
simon [Sat, 16 Jul 2011 12:03:14 +0000 (12:03 +0000)]
Mostly cosmetic change: don't claim to have found an SSH agent if
SSH_AUTH_SOCK is defined to the empty string. (Because a common way to
'unset' it is to run commands like 'SSH_AUTH_SOCK= putty -load thing'.)

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