simon-git: putty (pre-0.77): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Mar 12 21:04:05 GMT 2022
TL;DR:
382e1590 Windows: runtime switch between Unicode and ANSI windows.
5d2d2176 Windows Pageant: turn 'has_security' into a global function.
ba96a898 Windows Pageant: deal with PeekMessageW failing on legacy Windows.
d215fe47 windows/unicode.c: manually speak UTF-8.
cac9159a fixup! Remove hard dependencies on multi-monitor functions.
f69b4298 Fix trust status when Interactor returns a seat.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: pre-0.77
Committer: Simon Tatham <anakin at pobox.com>
Date: 2022-03-12 21:04:05
commit 382e15904396ce764274a606eb60e879d17b2ace
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=382e15904396ce764274a606eb60e879d17b2ace;hp=58281f9b92daf0398ae61b21ce0123fdb7d56a5e
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 06:43:59 2022 +0000
Windows: runtime switch between Unicode and ANSI windows.
Turns out that PuTTY hasn't run successfully on legacy Windows since
0.66, in spite of an ongoing intention to keep it working. Among the
reasons for this is that CreateWindowExW simply fails with
ERROR_CALL_NOT_IMPLEMENTED: apparently Win95 and its ilk just didn't
have fully-Unicode windows as an option.
Fixed by resurrecting the previous code from the git history (in
particular, code removed by commit 67e5ceb9a8e6bc2 was useful), and
including it as a runtime alternative.
One subtlety was that I found I had to name the A and W window classes
differently (by appending ".ansi" to the A one): apparently they
occupy the same namespace even though the names are in different
character sets, so if you somehow manage to register both classes,
they'll collide with each other without that tweak.
windows/window.c | 147 +++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 116 insertions(+), 31 deletions(-)
commit 5d2d2176330501e231c213f29ac1cbe755317655
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5d2d2176330501e231c213f29ac1cbe755317655;hp=382e15904396ce764274a606eb60e879d17b2ace
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 15:02:12 2022 +0000
Windows Pageant: turn 'has_security' into a global function.
Now it can be called from places other than Pageant's WinMain(). In
particular, the attempt to make a security descriptor in
lock_interprocess_mutex() is gated on it.
In return, however, I've tightened up the semantics. In normal PuTTY
builds that aren't trying to support pre-NT systems, the function
*unconditionally* returns true, on the grounds that we don't expect to
target any system that doesn't support the security APIs, and if
someone manages to contrive one anyway - or, more likely, if we some
day introduce a bug in our loading of the security API functions -
then this safety catch should make Pageant less likely to accidentally
fall back to 'never mind, just run in insecure mode'.
windows/pageant.c | 70 +++++++++++++++++---------------------
windows/platform.h | 1 +
windows/utils/interprocess_mutex.c | 4 +--
windows/utils/security.c | 14 ++++++++
4 files changed, 49 insertions(+), 40 deletions(-)
commit ba96a898e7152fd692dbc97a4be2e6420854a8d3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ba96a898e7152fd692dbc97a4be2e6420854a8d3;hp=5d2d2176330501e231c213f29ac1cbe755317655
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 15:18:38 2022 +0000
Windows Pageant: deal with PeekMessageW failing on legacy Windows.
This makes Pageant run on Win95 again. Previously (after fixing the
startup-time failures due to missing security APIs) it would go into
an uninterruptible CPU-consuming spin in the message loop when every
attempt to retrieve its messages failed because PeekMessageW doesn't
work at all on the 95 series.
windows/pageant.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
commit d215fe47e4fc5cadb88a6c09d8643d6e7c61230a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d215fe47e4fc5cadb88a6c09d8643d6e7c61230a;hp=ba96a898e7152fd692dbc97a4be2e6420854a8d3
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 16:16:01 2022 +0000
windows/unicode.c: manually speak UTF-8.
This is another fallback needed on Win95, where the Win32 API
functions to convert between multibyte and wide strings exist, but
they haven't heard of the UTF-8 code page. PuTTY can't really do
without that these days.
(In particular, if a server sends a remote window-title escape
sequence while the terminal is in UTF-8 mode, then _something_ needs
to translate the UTF-8 data into Unicode for Windows to reconvert into
the character set used in window titles.)
This is a weird enough thing to be doing that I've put it under the
new #ifdef LEGACY_WINDOWS, so behaviour in the standard builds should
be unchanged.
windows/unicode.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 81 insertions(+), 4 deletions(-)
commit cac9159a222f363dddf0f1e4035784c83ca29d70
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=cac9159a222f363dddf0f1e4035784c83ca29d70;hp=d215fe47e4fc5cadb88a6c09d8643d6e7c61230a
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 20:05:19 2022 +0000
fixup! Remove hard dependencies on multi-monitor functions.
windows/window.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit f69b42988b50a2f3e7d48612c82bb19dc393110e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f69b42988b50a2f3e7d48612c82bb19dc393110e;hp=cac9159a222f363dddf0f1e4035784c83ca29d70
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Mar 12 20:17:30 2022 +0000
Fix trust status when Interactor returns a seat.
While testing the unrelated pile of commits just past, I accidentally
started a Cygwin saved session I hadn't run in ages which used the old
Telnet-based cygtermd as a local proxy command, and found that it
presented the Cygwin prompt with a trust sigil. Oops!
It turns out that this is because interactor_return_seat does two
things that can change the real seat's trust status, and it does them
in the wrong order: it defaults the status back to trusted (as if the
seat was brand new, because that's how they start out), and it calls
tempseat_flush which may have buffered a trust-status reset while the
seat was borrowed. The former should not override the latter!
proxy/interactor.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
More information about the tartarus-commits
mailing list