1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
putty-source/unix
Simon Tatham a815c3a8e1 Fix spurious EAGAIN in Plink host key (and other) prompts.
Plink sets standard input into nonblocking mode, meaning that read()
from fd 0 in an interactive context will typically return -1 EAGAIN.
But the prompt functions in uxcons.c, used for verifying SSH host keys
and suchlike, were doing an unguarded read() from fd 0, and then
panicking and aborting the session when they got EAGAIN.

Fixed by inventing a wrapper around read(2) which handles EAGAIN but
passes all other errors back to the caller. (Seemed slightly less
dangerous than the stateful alternative of temporarily re-blockifying
the file descriptor.)

(cherry picked from commit bea758a7ae)

Conflicts:
	unix/uxcons.c

Cherry-picker's notes: the conflict was a trivial one. The new
function block_and_read() by this commit appears just before
verify_ssh_host_key(), which has a new prototype on the source branch,
close enough to disrupt the patch hunk's context. Easily fixed.
2015-10-17 17:30:53 +01:00
..
configure Move the Unix configure script up to the top level. 2014-02-22 18:01:32 +00:00
gtkcfg.c Fix two small memory leaks in config mechanism. 2015-06-20 09:39:14 +01:00
gtkcols.c Reinstate all the GTK1-specific code under ifdefs, and verify that 2008-04-04 10:56:26 +00:00
gtkcols.h Stop including <gtk/gtkcontainer.h> directly, since a user points out 2012-07-01 16:55:36 +00:00
gtkdlg.c Completely remove the privdata mechanism in dialog.h. 2015-06-20 09:39:14 +01:00
gtkfont.c Performance: cache character widths returned from Pango. 2015-10-17 17:30:17 +01:00
gtkfont.h Support font fallback even when an X11 server-side font is selected, 2011-09-16 19:18:54 +00:00
gtkwin.c pterm: set IUTF8 on pty devices depending on charset. 2015-10-17 17:30:17 +01:00
unix.h pterm: set IUTF8 on pty devices depending on charset. 2015-10-17 17:30:17 +01:00
ux_x11.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxagentc.c Tighten up a lot of casts from unsigned to int which are read by one 2013-07-14 10:45:54 +00:00
uxcfg.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxcons.c Fix spurious EAGAIN in Plink host key (and other) prompts. 2015-10-17 17:30:53 +01:00
uxgen.c Fix another giant batch of resource leaks. (Mostly memory, but there's 2013-07-14 10:46:07 +00:00
uxgss.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxmisc.c Key rollover: put the new Master Key fingerprint in the tools. 2015-10-17 17:30:17 +01:00
uxnet.c Log identifying information for the other end of connections. 2015-06-20 12:47:02 +01:00
uxnoise.c Fix minor file descriptor leaks. Found by cppcheck, reported by Tim Kosse. 2009-09-16 22:28:20 +00:00
uxpeer.c Log identifying information for the other end of connections. 2015-06-20 12:47:02 +01:00
uxplink.c Use local username consistently in Unix Plink. 2015-01-05 23:51:12 +00:00
uxprint.c Update to r8614: another -D_FORTIFY_SOURCE=2 fix. 2010-02-20 11:21:25 +00:00
uxproxy.c Log identifying information for the other end of connections. 2015-06-20 12:47:02 +01:00
uxpterm.c Revamp net_pending_errors using toplevel callbacks. 2013-08-17 16:06:27 +00:00
uxpty.c pterm: set IUTF8 on pty devices depending on charset. 2015-10-17 17:30:17 +01:00
uxputty.c Use the new host_str* functions to improve IPv6 literal support. 2014-01-25 15:58:54 +00:00
uxsel.c Changed my mind about r7164. Instead of checking for zero flags 2007-01-26 20:00:32 +00:00
uxser.c Fix another giant batch of resource leaks. (Mostly memory, but there's 2013-07-14 10:46:07 +00:00
uxsftp.c Only run one toplevel callback per event loop iteration. 2013-09-15 14:05:31 +00:00
uxshare.c Change the naming policy for connection-sharing Unix sockets. 2014-09-09 12:47:39 +00:00
uxsignal.c Rename some of the more stupidly named files in the Unix back end. 2004-12-31 13:02:46 +00:00
uxstore.c Fix error checking in uxstore.c: add a missing check, and fix a 2013-07-21 07:40:30 +00:00
uxucs.c Rationalise null pointer checks in both decode_codepage functions, so 2013-07-22 07:12:05 +00:00
xkeysym.c Support for non-ISO-8859-1 X keysyms. So in particular, pterm in a 2003-04-27 11:10:48 +00:00
xpmptcfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpterm.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpucfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmputty.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00