1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 18:07:59 +00:00
Commit Graph

3058 Commits

Author SHA1 Message Date
Jacob Nevins
a4aed21c1a Miscellaneous updates.
[originally from svn r7090]
2007-01-10 00:54:08 +00:00
Jacob Nevins
f9afa5e784 According to Frank Dijcks, this cast makes OpenWatcom happier.
[originally from svn r7089]
2007-01-10 00:46:45 +00:00
Jacob Nevins
726def0881 Various SSH-related things were appearing in the PuTTYtel configuration dialog,
probably since the addition of the serial backend. Use a more robust check for
SSH support.

[originally from svn r7088]
2007-01-10 00:16:53 +00:00
Jacob Nevins
097fc8b43d MinGW needs an extra symbol _WIN32_IE defined to a particular value before
it'll let you see an identifier (SHGFP_TYPE_CURRENT) referenced since r7082.
(Actually, you need a pretty recent w32api before it's there at all.)

Morally, this should be defined for all toolchains, not just MinGW/Cygwin, but  I'll leave that to people who have those toolchains.
<http://msdn2.microsoft.com/en-us/library/aa383745.aspx>

Also add some other comments on our use of this API (since it's a horrible one
that I suspect will come back and haunt us...)

[originally from svn r7087]
[r7082 == dbbd6eb5ec]
[this svn revision also touched putty-wishlist]
2007-01-09 23:47:15 +00:00
Simon Tatham
42801b7e9e Get rid of all the MSVC warnings.
[originally from svn r7086]
2007-01-09 18:24:07 +00:00
Simon Tatham
4fa9564c90 Fix `puttygen-unix-perms': f_open(), PuTTY's wrapper on fopen, now
takes a third argument which is TRUE if the file is being opened for
writing and wants to be created in such a way that it's readable
only to the owner. This is used when saving private keys.

While I'm here, I also use this option when writing session logs, on
the general principle that they probably contain _something_
sensitive.

The new argument is only supported on Unix, for the moment. (I think
writing owner-accessible-only files is the default on Windows.)

[originally from svn r7084]
2007-01-09 18:14:30 +00:00
Simon Tatham
dbbd6eb5ec Fix `win-randseed-location': use SHGetFolderPath() to find the
Application Data directory in preference to the old-fashioned
attempt to find the user's home directory, and use the _local-
machine_ Application Data directory in preference even to that.

SHGetFolderPath() is called via GetProcAddress, so this degrades
gracefully on old Windowses. (Tested myself on Win95.)

As part of this change, we now search for a location for the seed
file separately for reading and writing, so that installing the new
PuTTY should cause a seamless migration as the old seed file is read
from the old location and then a new one written to the new location.

`putty -cleanup' attempts to delete the seed file from _all_
affected locations.

Naturally, a user-specified seed file path in the Registry still
takes priority over all other means of finding the location.

[originally from svn r7082]
2007-01-09 18:05:17 +00:00
Simon Tatham
6c3f4b3baa The remaining issue in `win-askappend-multi' appears to have been
caused by the MessageBox() internal message loop eating WinSock
FD_READ notifications, which then don't reappear afterwards because
you have to explicitly prod a socket in order to get a repeat
notification on it.

Hence, here's a piece of infrastructure which seems to sort it out:
a new winnet.c function called socket_reselect_all(), whose function
is to go through all currently active sockets and re-run
WSAAsyncSelect() on them, causing repeat notifications for anything
we might have missed. I call this after every call to MessageBox(),
and that seems to solve the problem.

(The problem was actually masked in very recent revisions, probably
by the reinstatement of pending_netevent in r7071. However, I don't
believe that was a complete fix. This should be.)

[originally from svn r7077]
[r7071 == 57a763b0ec]
2007-01-08 19:38:39 +00:00
Simon Tatham
bacbc03f9f Have one call to from_backend() per call to do_telnet_read(),
instead of the previous rate of one per character. In `Flush log
file frequently' mode, the latter was causing excessive slowdown due
to fflush()ing once per byte.

[originally from svn r7076]
2007-01-08 18:54:49 +00:00
Simon Tatham
274f6a60f7 Fix ssh2-cisco-pw-pad by reverting r5122. However, I've kept the
ability to easily re-enable the r5122 behaviour, in case we need to
conditionally switch between the two at a later date.

[originally from svn r7073]
[r5122 == 8a20515844]
[this svn revision also touched putty-wishlist]
2007-01-07 14:30:24 +00:00
Simon Tatham
720693cfab Greater leniency when importing private key files: accept both CRLF
and LF, and don't object if the final line of the key lacks a
newline. Also, while I'm here, switch to using fgetline() throughout
so as not to have to do nasty buffer-size ad-hockery.

[originally from svn r7072]
2007-01-07 14:20:28 +00:00
Simon Tatham
57a763b0ec Reinstate RDB's pending_netevent mechanism, which was removed in
r4906 in the process of adding the new timing code. It seems to have
been what was previously preventing spew-lockup, and still seems to
prevent it now I've put it back in.

[originally from svn r7071]
[r4906 == 7ecf13564a]
[this svn revision also touched putty-wishlist]
2007-01-07 12:40:21 +00:00
Simon Tatham
c1a9dbef13 Tweak the icon script, and the generated icons, to more closely
match the original icons. (Apparently I managed to introduce errors
while transcribing the originals for detailed analysis.)

While I'm at it, add the obviously useful `make install' target in
icons/Makefile, and fix the svn:ignore property on the icons
directory.

[originally from svn r7068]
2007-01-07 10:17:12 +00:00
Jacob Nevins
53fa67eb18 I think this change to Recipe was accidentally omitted from r7064.
[originally from svn r7065]
[r7064 == 334ef0824c]
2007-01-06 20:01:30 +00:00
Simon Tatham
334ef0824c No, I tell a lie: GTK 1 _does_ support icons, at least partially. Ooh.
[originally from svn r7064]
2007-01-06 18:27:00 +00:00
Simon Tatham
a8bdd536c8 Shiny new script which constructs the various icons for the PuTTY
suite. In a dramatic break with tradition, I'm actually checking in
the resulting icon files as well as the script that generates them,
because the script requires Python and ImageMagick and I don't think
it's reasonable to require that much extra infrastructure on
everyone checking out from Subversion.

The new icons should be _almost_ indistinguishable from the old
ones, at least at the 32x32 resolution. The immediately visible
change is that all the icons now come in 16x16, 32x32 and 48x48
formats, in both 16 colours and monochrome, instead of an ad-hoc
mixture of whichever ones I could be bothered to draw.

The same code can also be adapted to generate icons for the GTK port
(although icons for the running programs don't seem to be supported
by GTK 1 - another reason to upgrade to GTK 2!).

[originally from svn r7063]
2007-01-06 18:15:35 +00:00
Simon Tatham
dc03c3948f Francois L'Archeveque spotted that the variable `winsock2_module'
only exists when compiling for IPv6, so we shouldn't try assigning
to it the rest of the time.

[originally from svn r7059]
2007-01-05 18:43:58 +00:00
Jacob Nevins
55947f2346 It's a new year.
[originally from svn r7048]
[this svn revision also touched putty-website,puzzles]
2007-01-01 21:19:14 +00:00
Jacob Nevins
4ae926fa8a Patch inspired by one from Daniel Silverstone in Debian bug #229232:
We now have an option where a remote window title query returns a well-formed
response containing the empty string. This should keep stop any server-side
application that was expecting a response from hanging, while not permitting
the response to be influenced by an attacker.

We also retain the ability to stay schtum. The existing checkbox has thus
grown into a set of radio buttons.

I've changed the default to the "empty string" response, even in the backward-
compatibility mode of loading old settings, which is a change in behaviour;
any users who want the old behaviour back will have to explicitly select it. I
think this is probably the Right Thing. (The only drawback I can think of is
that an attacker could still potentially use the relevant fixed strings for
mischief, but we already have other, similar reports.)

[originally from svn r7043]
2006-12-31 15:33:33 +00:00
Jacob Nevins
cd94e3bc3c Patch from Colin Watson intended to give a clean Unix compile with GCC 4.
(Since we choose to compile with -Werror, this is particularly important.)

I haven't yet checked that the resulting source actually compiles cleanly with
GCC 4, hence not marking `gcc4-warnings' as fixed just yet.

[originally from svn r7041]
2006-12-30 23:00:14 +00:00
Jacob Nevins
dbb8e96493 Use va_copy() where available. This should fix a segfault in vsnprintf()
on AMD 64 Linux.
(This has been sitting in my checkout for ages and hasn't obviously caused
any trouble -- I think I was waiting to get round to trying it with VC6, which
I haven't yet. There are some notes in comments on further tweaks that could
be made.)

[originally from svn r7035]
2006-12-29 16:38:52 +00:00
Simon Tatham
9cea4aaf06 Colin Watson points out that there was no need for me to write the
custom Panels container widget for the PuTTY config box, since the
perfectly standard GtkNotebook does the same job. Hence, let's
remove Panels completely in favour of doing it the proper way.

[originally from svn r7034]
2006-12-29 14:35:34 +00:00
Jacob Nevins
89f7c2c8ce Add a NO_HTMLHELP option, and enable it by default in the Cygwin Makefile,
since even the latest version of w32api (3.6) shows no sign of HTMLHelp
support.

(This touches mkfiles.pl because that's where the details of what Cygwin
doesn't support are kept currently. This may be deliberate, so I haven't
changed it.)

[originally from svn r7032]
2006-12-28 20:56:01 +00:00
Simon Tatham
82b3b2fdb7 I'm not sure why I added htmlhelp.lib to the PuTTY link lines in
r7000. I was probably half asleep. Actually, it's completely
unnecessary to bind to it at link time, because we load it at run
time in order to continue working as before on Win95. So I'm
removing it again.

[originally from svn r7030]
[r7000 == 1dac1bc911]
2006-12-28 15:47:53 +00:00
Simon Tatham
3a13c14e62 Nearly forgot: add the .CHM to the PuTTY installer. This involves
making the manual shortcut in the Start menu point to one or other
of the two help files depending on the version of Windows;
fortunately Inno Setup has no difficulty doing that.

[originally from svn r7028]
2006-12-28 10:39:56 +00:00
Simon Tatham
7e4786355d `make mostlyclean', to remove everything directly Halibut-generated
but not the CHM. It'll come in useful during the release process.

[originally from svn r7027]
2006-12-28 10:38:46 +00:00
Simon Tatham
1f352e935b Add some CHM-related stuff to the release checklist. Don't want to
forget about it when the time comes.

[originally from svn r7012]
2006-12-24 16:25:30 +00:00
Simon Tatham
d86e01e836 After discussion with Jeroen Massar, here's a patch (mostly his)
which we think fixes the vista-ipv6 problem.

[originally from svn r7007]
2006-12-23 09:04:27 +00:00
Simon Tatham
8f458f7825 Minor style tweaks for the CHM.
[originally from svn r7002]
2006-12-19 10:28:44 +00:00
Jacob Nevins
d660f65ac1 Sort out line-endings on new file.
[originally from svn r7001]
2006-12-17 17:46:12 +00:00
Simon Tatham
1dac1bc911 Initial support for HTML Help. All the ad-hoc help-file finding code
and various calls to WinHelp() have been centralised into a new file
winhelp.c, which in turn has been modified to detect a .CHM file as
well as .HLP and select between them as appropriate. It explicitly
tries to load HHCTRL.OCX and use GetProcAddress, meaning that it
_should_ still work correctly on pre-HTML-Help platforms, falling
gracefully back to WinHelp, but although I tested this by
temporarily renaming my own HHCTRL.OCX I haven't yet been able to
test it on a real HTML-Help-free platform.

Also in this checkin: a new .but file and docs makefile changes to
make it convenient to build the sources for a .CHM. As yet, owing to
limitations of Halibut's CHM support, I'm not able to write a .CHM
directly, more's the pity.

[originally from svn r7000]
2006-12-17 11:16:07 +00:00
Ben Harris
86eac20abb Set FD_CLOEXEC in a little convenience function that does the right thing
with F_GETFD and F_SETFD.

[originally from svn r6978]
2006-12-09 15:44:31 +00:00
Simon Tatham
2226098a9e Correct an embarrassingly wrong comment.
[originally from svn r6926]
2006-11-28 21:51:54 +00:00
Simon Tatham
fd6d9bd677 I've just discovered that using the saved sessions menu from Unix
PuTTY causes the child process to inherit a lot of socket fds from
its parent, which is a pain if one of them then ends up holding open
a listening socket which the parent was using for port forwarding
after the parent itself is dead.

Therefore, this checkin sprinkles FD_CLOEXEC throughout the Unix
platform directory wherever there looks like being a long-lived fd.

[originally from svn r6917]
2006-11-23 14:32:11 +00:00
Simon Tatham
230d400ddc Reinstate as much of the Windows font-linking behaviour as I can
easily manage, by adopting a hybrid approach to Unicode text
display. The old approach of simply calling ExtTextOutW provided
font linking without us having to lift a finger, but didn't do the
right thing when it came to bidirectional or Arabic-shaped text.
Arabeyes' replacement exact_textout() supported the latter, but
turned out to break the former (with no warning from the Windows API
documentation, so it's not their fault).

So now I've got a second wrapper layer called general_textout(),
which splits the input string into substrings based on bidi
character class. Any character liable to cause bidi or shaping
behaviour if fed straight to ExtTextOutW is instead fed through
Arabeyes' exact_textout(), but the rest is fed straight to
ExtTextOutW as it used to be.

The effect appears to be that font linking is restored for all
characters _except_ Arabic and other bidi scripts, which means in
particular that we are no longer in a state of regression over 0.57.
(0.57 would have done font linking on Arabic as well, but would also
have misbidied it, so we've merely exchanged one failure mode for
another slightly less harmful one in that situation.)

[originally from svn r6910]
2006-11-18 15:10:48 +00:00
Jacob Nevins
53843b7392 Chris Boucher spotted that after "-nc" was added (r6823), cfg->ssh_nc_host
was not always initialised, which could lead to spurious attempts to open
a bogus channel (typically refused: "FATAL ERROR: Server refused to open
a direct-tcpip channel"). Fixed.

[originally from svn r6907]
[r6823 == 631b494807]
2006-11-15 23:42:22 +00:00
Jacob Nevins
ffdbfd42a0 (Config).remote_cmd2[512] was added in r1208, but it wasn't used then and isn't
now, so presumably never has been. Remove.

[originally from svn r6906]
[r1208 == ff9a038cdd]
2006-11-15 23:12:20 +00:00
Jacob Nevins
908acc3adb publickeyfile now an RFC
[originally from svn r6905]
[this svn revision also touched putty-website]
2006-11-15 12:56:48 +00:00
Jacob Nevins
27c50ee652 Link to faq-cleanup from faq-settings.
[originally from svn r6904]
2006-11-15 11:48:07 +00:00
Jacob Nevins
3bc889e6e1 There's been an increase in people posting non-SSH PuTTY-related questions
to comp.security.ssh, posting queries that are clearly about PuTTY to
newsgroups without actually mentioning PuTTY, and so on. They may have been
directed there by this document :( Add a futile attempt to instil a sense of
etiquette.

[originally from svn r6895]
2006-11-08 21:15:30 +00:00
Jacob Nevins
e2215a31f6 Administrivia: most SSH-2 specs are no longer drafts.
[originally from svn r6890]
2006-11-08 00:55:13 +00:00
Jacob Nevins
06c7e29607 Tiny comment fix.
[originally from svn r6885]
2006-10-31 16:59:56 +00:00
Jacob Nevins
cc28093380 Spotted by Tim Kosse: we were returning an incorrect path in canonify() when
we couldn't get any sense out of the server.

[originally from svn r6877]
2006-10-22 20:19:55 +00:00
Jacob Nevins
64f19d46d8 Minor semantic tweak to bug-compatibility modes: make
BUG_NEEDS_SSH1_PLAIN_PASSWORD do exactly what it says on the tin, independent
of whether BUG_CHOKES_ON_SSH1_IGNORE is set.

This is invisible in the default configuration, as all servers marked as having
the second bug have the first one too, but it would allow one to manually
configure PuTTY to cope with a SSH-1 server that got upset by ignore messages
during authentication, but was fine with their use as keepalives.

[originally from svn r6876]
2006-10-22 19:51:28 +00:00
Simon Tatham
e9ce146b9f Disable a bunch of undesirable termios flags. ICRNL, in particular,
is liable to have been set on serial ports previously used as
terminal devices, and definitely wants not to be set on serial ports
being used for callout.

[originally from svn r6865]
2006-10-03 17:16:26 +00:00
Simon Tatham
1ee1d694cf IXON and IXOFF belong in _iflag_, not cflag! While I'm here, be more
reliable in clearing of RTS/CTS flags.

[originally from svn r6864]
2006-10-02 20:52:57 +00:00
Simon Tatham
a2338cb6f2 Fix breakage of `Restart Session' in r6802. When restarting the
session, we were clearing the new session_closed flag, but failing
to clear must_close_session; with that set, the session was being
opened but immediately re-closed.

[originally from svn r6857]
[r6802 == 0dcdb6c3c1]
2006-09-21 11:48:32 +00:00
Jacob Nevins
234faec96c Note that the dynamic-tunnel proxy does not support UDP, since we get asked
about this quite often.

[originally from svn r6855]
2006-09-15 14:44:21 +00:00
Jacob Nevins
9c954238bd CSI 3 J now clears the scrollback, as in xterm.
[originally from svn r6847]
[this svn revision also touched putty-wishlist]
2006-09-05 22:08:00 +00:00
Jacob Nevins
2afdb02660 I seem to have slightly funted Plink's display of banners etc in r6437, oops.
Fixed.

[originally from svn r6846]
[r6437 == 8719f92c14]
2006-09-05 21:41:38 +00:00