simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Jun 29 12:24:53 BST 2024
TL;DR:
f454c84a Rename SocketPeerInfo to SocketEndpointInfo.
23b15dbc Allow sockets to retrieve their local endpoint info.
c1d9da67 Pass the calling Socket to plug_log.
7618e079 Log outgoing address + port numbers in the Event Log.
807ed08d Centralise stub plug/socket functions.
b7174344 README: clarify that you need to run vcvars32 first.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2024-06-29 12:24:53
commit f454c84a2355fd7297db065ab34e845f2c6102a9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f454c84a2355fd7297db065ab34e845f2c6102a9;hp=431838747b63d3a7a0811325c0ac15d001bf0d63
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 26 06:35:40 2024 +0100
Rename SocketPeerInfo to SocketEndpointInfo.
I'm preparing to be able to ask about the other end of the connection
too, so the first step is to give this data structure a neutral name
that can refer to either. No functional change yet.
defs.h | 2 +-
errsock.c | 2 +-
network.h | 16 ++++++++--------
pageant.c | 4 ++--
proxy/sshproxy.c | 2 +-
psocks.c | 4 ++--
ssh.h | 8 ++++----
ssh/connection1-client.c | 2 +-
ssh/connection1-server.c | 2 +-
ssh/connection1.c | 4 ++--
ssh/connection1.h | 2 +-
ssh/connection2-client.c | 4 ++--
ssh/connection2-server.c | 4 ++--
ssh/connection2.c | 4 ++--
ssh/connection2.h | 4 ++--
ssh/portfwd.c | 4 ++--
ssh/sesschan.c | 4 ++--
ssh/sharing.c | 4 ++--
unix/network.c | 8 ++++----
unix/psusan.c | 4 ++--
unix/uppity.c | 6 +++---
utils/sk_free_peer_info.c | 12 ++++++------
windows/handle-socket.c | 6 +++---
windows/named-pipe-server.c | 2 +-
windows/network.c | 8 ++++----
25 files changed, 61 insertions(+), 61 deletions(-)
commit 23b15dbc772381294f23c83f0aba1e282bed9cb2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=23b15dbc772381294f23c83f0aba1e282bed9cb2;hp=f454c84a2355fd7297db065ab34e845f2c6102a9
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 26 06:47:53 2024 +0100
Allow sockets to retrieve their local endpoint info.
The peer_info method in the Socket vtable is replaced with
endpoint_info, which takes a boolean indicating which end you're
asking about.
sk_peer_info still exists, as a wrapper on the new sk_endpoint_info.
errsock.c | 4 ++--
network.h | 6 ++++--
proxy/proxy.c | 15 ++++++++++++++-
proxy/sshproxy.c | 4 ++--
unix/fd-socket.c | 7 ++++++-
unix/network.c | 14 +++++++++-----
windows/handle-socket.c | 12 ++++++++----
windows/named-pipe-server.c | 5 +++--
windows/network.c | 18 +++++++++++++-----
9 files changed, 61 insertions(+), 24 deletions(-)
commit c1d9da67a261e3898a5922462c3fda09beffe127
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=c1d9da67a261e3898a5922462c3fda09beffe127;hp=23b15dbc772381294f23c83f0aba1e282bed9cb2
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 26 08:29:39 2024 +0100
Pass the calling Socket to plug_log.
This enables plug_log to run query methods on the socket in order to
find out useful information to log. I don't expect it's sensible to do
anything else with it.
network.h | 15 ++++++++-------
otherbackends/raw.c | 9 +++++----
otherbackends/rlogin.c | 6 +++---
otherbackends/supdup.c | 6 +++---
otherbackends/telnet.c | 6 +++---
proxy/local.c | 3 ++-
proxy/proxy.c | 15 ++++++++-------
proxy/sshproxy.c | 13 +++++++------
proxy/telnet.c | 3 ++-
psocks.c | 10 ++++++----
ssh/portfwd.c | 6 ++++--
ssh/server.c | 5 +++--
ssh/sesschan.c | 4 ++--
ssh/ssh.c | 7 ++++---
ssh/userauth2-client.c | 5 +++--
ssh/x11fwd.c | 4 ++--
stubs/null-plug.c | 2 +-
unix/fd-socket.c | 6 +++---
unix/network.c | 10 +++++-----
unix/pageant.c | 4 ++--
unix/psusan.c | 4 ++--
unix/uppity.c | 4 ++--
utils/backend_socket_log.c | 2 +-
utils/log_proxy_stderr.c | 6 +++---
windows/handle-socket.c | 5 +++--
windows/named-pipe-server.c | 2 +-
windows/network.c | 12 ++++++------
27 files changed, 94 insertions(+), 80 deletions(-)
commit 7618e079f516fde0636756d29247ed8bb3a1709e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=7618e079f516fde0636756d29247ed8bb3a1709e;hp=c1d9da67a261e3898a5922462c3fda09beffe127
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Jun 29 11:48:48 2024 +0100
Log outgoing address + port numbers in the Event Log.
This is the payoff from the previous three commits. If you run
'netstat' or 'ss' or equivalent, and see multiple outgoing SSH
connections from your machine, and you want to match them up to the
instances of PuTTY you can see on your desktop, how would you do it?
On Linux you can trace each socket to an owning pid via 'ss -p', but
tracing the pid in turn to a window isn't so easy. On Windows even the
first step is hard.
Now it shouldn't be too hard, because the Event Log mentions the IP
address and ephemeral port number of the local end of a connection,
after that connection is established, if that information is
available. So now you can connect the local port numbers shown in the
'netstat' or 'ss' output with the ones in the GUI's Event Log.
(This might be useful if, for example, one connection was showing a
backlog in netstat, and you wanted to investigate the corresponding
GUI.)
utils/backend_socket_log.c | 10 ++++++++++
1 file changed, 10 insertions(+)
commit 807ed08da0ac9f5bbb66275df0432eda152db35b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=807ed08da0ac9f5bbb66275df0432eda152db35b;hp=7618e079f516fde0636756d29247ed8bb3a1709e
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Jun 29 12:07:59 2024 +0100
Centralise stub plug/socket functions.
In the previous few commits I noticed some repeated work in the form
of pointless empty implementations of Plug's log method, plus some
existing (and some new) empty cases of Socket's endpoint_info. As a
cleanup, I'm replacing as many as I can find with uses of a central
null implementation in the stubs directory.
errsock.c | 7 +------
network.h | 5 +++++
proxy/sshproxy.c | 7 +------
ssh/portfwd.c | 18 ++----------------
ssh/server.c | 10 +---------
ssh/sesschan.c | 14 ++++----------
ssh/x11fwd.c | 8 +-------
stubs/CMakeLists.txt | 3 ++-
stubs/null-socket.c | 12 ++++++++++++
unix/fd-socket.c | 7 +------
unix/pageant.c | 20 +++++++-------------
windows/named-pipe-server.c | 8 +-------
12 files changed, 38 insertions(+), 81 deletions(-)
commit b7174344e60f1a08b1288c79aa7f13f923bb4765
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b7174344e60f1a08b1288c79aa7f13f923bb4765;hp=807ed08da0ac9f5bbb66275df0432eda152db35b
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Jun 29 12:12:04 2024 +0100
README: clarify that you need to run vcvars32 first.
The source-code README file claims that you can start by just running
'cmake .'. But on Windows, that's not literally true. cmake will
expect to find a compiler on your path, and if it doesn't, will fail
to configure.
I'd always taken this for granted, assuming that anyone who was
reading this README and trying to compile PuTTY was already familiar
with how Windows compiler toolchains work, and only needed the part of
the instructions that were specific to PuTTY.
But of course there's no reason that should be true. PuTTY's primary
target audience, even from before it was called PuTTY, has been Unix
expats: people who like to do nearly everything on Unix but for some
reason have a Windows machine in front of them. Such a person might
very well be familiar with _Unix_ compilation, where the C compiler is
installed in /usr/bin and on your PATH already. And then if they want
to try to tweak PuTTY, that will be the first time they have to engage
with a Windows compiler!
So we do need to at least _say_ that the user needs to start by
running vcvars32.bat or one of its friends. Even if we don't give full
details of where to find it (because I've known it to change now and
then), we at least need to remind people to go and look for it.
README | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
More information about the tartarus-commits
mailing list