1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/windows
Simon Tatham c6ff548ae0 wincliloop: cope with winselcli_event not existing.
I found recently that if I ran Windows PSCP as a connection-sharing
downstream, it would send the SSH greeting down the named pipe, but
never receive anything back, though the upstream PuTTY was sending it.
PuTTY and Plink from the same build of the code would act happily as
downstreams.

It turned out that this was because the WaitForMultipleObjects call in
cli_main_loop() in wincliloop.c was failing with ERROR_ACCESS_DENIED.
That happened because it had an INVALID_HANDLE_VALUE in its list of
objects to wait for. That in turn happened because winselcli_event was
set to INVALID_HANDLE_VALUE.

Why was winselcli_event not set up? Because it's set up lazily by
do_select(), so if the program isn't handling any network sockets at
all (which is the case when PSCP is speaking over a named pipe
instead), then it never gets made into a valid event object.

So the problem wasn't that winselcli_event was in a bad state; it was
quite legitimately invalid. The problem was that wincliloop ought to
have _coped_ with it being invalid, by not inserting it in its list of
objects to wait for.

So now we check that case, and only insert winselcli_event in the list
if it's valid. And PSCP works again over connection sharing.
2021-01-19 20:35:13 +00:00
..
installer.wxs Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
make_install_images.sh Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
msifixup.py Remove white dialog background in MSI user interface. 2020-06-21 16:39:47 +01:00
pageant.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pageant.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pageant.rc Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
pageants.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
plink.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
pscp.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pscp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
psftp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
putty.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
putty.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
putty.rc Add support for the SUPDUP protocol. 2020-03-10 07:11:32 +00:00
puttycfg.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttygen.rc Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
puttyins.ico `installer.ico' doesn't fit into 8.3, so gets truncated to INSTALLE.ICO in 2007-02-06 22:39:15 +00:00
puttytel.mft Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
puttytel.rc Tweak version string resources for EMBED_CHM. 2019-03-16 12:25:23 +00:00
rcstuff.h Remove Makefile.bor. 2017-09-13 19:26:28 +01:00
README-msi.txt Remove note about .CHM on network drives. 2019-03-18 21:53:45 +00:00
sizetip.c Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
version.rc2 FIXME about Windows resource CHMfulness hint. 2019-03-18 22:02:13 +00:00
website.url Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
win_res.h Stop looking for putty.chm alongside the binary. 2019-03-16 12:25:23 +00:00
win_res.rc2 Grow the Windows Licence dialog. 2019-03-18 20:32:55 +00:00
wincapi.c Stop using GLOBAL Windows API function pointers. 2020-02-02 10:02:10 +00:00
wincapi.h Stop using GLOBAL Windows API function pointers. 2020-02-02 10:02:10 +00:00
wincfg.c Rework per-backend GUI configuration. 2020-03-10 21:27:57 +00:00
wincliloop.c wincliloop: cope with winselcli_event not existing. 2021-01-19 20:35:13 +00:00
wincons.c Work around console I/O size limit on Windows 7. 2020-02-09 08:51:37 +00:00
winctrls.c Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
windefs.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
windlg.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
window.c Support SGR 9 for strikethrough effect on text. 2020-08-13 21:08:53 +01:00
wingss.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winhandl.c Fix a few 'triple letter in place of double' typos. 2021-01-17 09:18:42 +00:00
winhelp.c Remove most traces of WinHelp support. 2019-03-26 00:27:04 +00:00
winhelp.h Merge the 0.74 release branch back to master. 2020-06-27 08:11:22 +01:00
winhelp.rc2 Tweak version string resources for EMBED_CHM. 2019-03-16 12:25:23 +00:00
winhsock.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
winjump.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winmisc.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winmiscs.c Hardware-accelerated SHA-512 on the Arm architecture. 2020-12-24 15:39:54 +00:00
winnet.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
winnohlp.c Stop looking for putty.chm alongside the binary. 2019-03-16 12:25:23 +00:00
winnoise.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winnojmp.c Fix up svn:eol-style and svn:keywords on new files. 2010-12-27 00:24:48 +00:00
winnpc.c winnpc.c: add low-level connect_to_named_pipe() function. 2020-01-04 13:52:22 +00:00
winnps.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
winpgen.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
winpgnt.c Windows Pageant: initial work on deferred decryption. 2020-03-21 15:59:51 +00:00
winpgntc.c Add lots of missing 'static' keywords. 2020-01-29 06:44:18 +00:00
winplink.c Document -logoverwrite and -logappend. 2020-11-25 15:12:56 +00:00
winprint.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winproxy.c Make the plug_log type code into an enum. 2020-02-07 19:17:45 +00:00
winseat.h GUI PuTTY: stop using the global 'hwnd'. 2020-02-02 10:02:10 +00:00
winsecur.c Stop using GLOBAL Windows API function pointers. 2020-02-02 10:02:10 +00:00
winsecur.h Stop using GLOBAL Windows API function pointers. 2020-02-02 10:02:10 +00:00
winselcli.c Const-correctness in do_select() return value. 2020-01-04 13:52:22 +00:00
winselgui.c Const-correctness in do_select() return value. 2020-01-04 13:52:22 +00:00
winser.c Improve stop-bits messages in serial setup. 2020-06-14 15:49:36 +01:00
winsftp.c winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
winshare.c Move obfuscate_name out of winshare.c. 2020-01-04 13:52:22 +00:00
winsocks.c Auxiliary application: 'psocks', a simple SOCKS server. 2020-02-23 16:36:27 +00:00
winstore.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
winstuff.h winsftp.c: avoid creating multiple netevents. 2020-02-09 08:19:21 +00:00
wintime.c wintime: add a precautionary memset to zero. 2017-02-14 23:25:25 +00:00
winucs.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
winutils.c Stop winutils.c from depending on the global HWND. 2020-02-02 10:02:10 +00:00
winx11.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00