simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Oct 10 21:54:26 BST 2018
TL;DR:
3f0f6d20 Missing error message when loading a private key file.
5ea3a24b ssh2userauth: remove an unused variable.
1b67ec29 ssh2userauth: stop hardcoding the successor layer name.
ad0c502c Refactor the LogContext type.
e053ea9a Remove two useless declarations.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2018-10-10 21:54:26
commit 3f0f6d2013dd19afa2033d7f33961ff1ed90000f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3f0f6d2013dd19afa2033d7f33961ff1ed90000f;hp=78d0022c707b3dffa2514fe842be04224213da73
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Oct 9 18:07:52 2018 +0100
Missing error message when loading a private key file.
If the file is empty, or otherwise fails to start with a recognised
'PuTTY-User-Key-File' header line, we forgot to fill in the error
message before returning failure, leading to a null pointer
dereference.
sshpubk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 5ea3a24b0ff1d8312a189b953d9c1c2d236957bd
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5ea3a24b0ff1d8312a189b953d9c1c2d236957bd;hp=3f0f6d2013dd19afa2033d7f33961ff1ed90000f
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Oct 9 18:10:06 2018 +0100
ssh2userauth: remove an unused variable.
s->done_service_req was set but never read; it's not needed at all in
the current code structure, where the service request has already
happened in an entirely different source file and userauth never has
to track it at all.
ssh2userauth.c | 2 --
1 file changed, 2 deletions(-)
commit 1b67ec2963a7c98448b61852d992a3fcb043cfc3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1b67ec2963a7c98448b61852d992a3fcb043cfc3;hp=5ea3a24b0ff1d8312a189b953d9c1c2d236957bd
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Oct 9 18:11:17 2018 +0100
ssh2userauth: stop hardcoding the successor layer name.
Not that we ever actually _support_ trying to authenticate for any SSH
subprotocol other than "ssh-connection", or any plans to add such
support. But it's inelegant to hardcode it at all when we have it
right there in the successor layer's vtable.
ssh2userauth.c | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
commit ad0c502cefcbc0ab039c936034c2603f5793a161
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ad0c502cefcbc0ab039c936034c2603f5793a161;hp=1b67ec2963a7c98448b61852d992a3fcb043cfc3
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Oct 10 19:26:18 2018 +0100
Refactor the LogContext type.
LogContext is now the owner of the logevent() function that back ends
and so forth are constantly calling. Previously, logevent was owned by
the Frontend, which would store the message into its list for the GUI
Event Log dialog (or print it to standard error, or whatever) and then
pass it _back_ to LogContext to write to the currently open log file.
Now it's the other way round: LogContext gets the message from the
back end first, writes it to its log file if it feels so inclined, and
communicates it back to the front end.
This means that lots of parts of the back end system no longer need to
have a pointer to a full-on Frontend; the only thing they needed it
for was logging, so now they just have a LogContext (which many of
them had to have anyway, e.g. for logging SSH packets or session
traffic).
LogContext itself also doesn't get a full Frontend pointer any more:
it now talks back to the front end via a little vtable of its own
called LogPolicy, which contains the method that passes Event Log
entries through, the old askappend() function that decides whether to
truncate a pre-existing log file, and an emergency function for
printing an especially prominent message if the log file can't be
created. One minor nice effect of this is that console and GUI apps
can implement that last function subtly differently, so that Unix
console apps can write it with a plain \n instead of the \r\n
(harmless but inelegant) that the old centralised implementation
generated.
One other consequence of this is that the LogContext has to be
provided to backend_init() so that it's available to backends from the
instant of creation, rather than being provided via a separate API
call a couple of function calls later, because backends have typically
started doing things that need logging (like making network
connections) before the call to backend_provide_logctx. Fortunately,
there's no case in the whole code base where we don't already have
logctx by the time we make a backend (so I don't actually remember why
I ever delayed providing one). So that shortens the backend API by one
function, which is always nice.
While I'm tidying up, I've also moved the printf-style logeventf() and
the handy logevent_and_free() into logging.c, instead of having copies
of them scattered around other places. This has also let me remove
some stub functions from a couple of outlying applications like
Pageant. Finally, I've removed the pointless "_tag" at the end of
LogContext's official struct name.
Recipe | 2 +-
be_misc.c | 5 ++--
cmdgen.c | 3 --
defs.h | 4 ++-
fuzzterm.c | 5 ----
logging.c | 64 +++++++++++++++++++++++-------------------
misc.c | 6 ----
misc.h | 7 -----
network.h | 6 ++--
portfwd.c | 28 ++++++-------------
proxy.c | 20 +++++--------
pscp.c | 7 ++---
psftp.c | 7 ++---
putty.h | 80 +++++++++++++++++++++++++++++++++++++++-------------
raw.c | 16 ++++-------
rlogin.c | 16 ++++-------
ssh.c | 41 +++++++++++----------------
ssh.h | 8 +++---
ssh1bpp.c | 7 ++---
ssh1connection.c | 4 +--
ssh2bpp-bare.c | 4 +--
ssh2bpp.c | 7 ++---
ssh2connection.c | 4 +--
sshbpp.h | 16 +++++++----
sshcommon.c | 6 ----
sshppl.h | 5 ++--
sshshare.c | 29 ++++++-------------
sshverstring.c | 9 +++---
telnet.c | 82 +++++++++++++++++++-----------------------------------
testback.c | 5 ++--
testbn.c | 1 -
unix/gtkdlg.c | 4 +--
unix/gtkwin.c | 43 ++++++++++++++++++++++------
unix/uxcons.c | 40 +++++++++++++++-----------
unix/uxpgnt.c | 1 -
unix/uxplink.c | 6 ++--
unix/uxpty.c | 10 ++-----
unix/uxser.c | 43 ++++++++--------------------
windows/wincons.c | 32 +++++++++++++--------
windows/windlg.c | 24 ++++++++++++----
windows/window.c | 10 +++----
windows/winnet.c | 28 +------------------
windows/winpgen.c | 1 -
windows/winpgnt.c | 1 -
windows/winplink.c | 8 ++----
windows/winser.c | 46 ++++++++++--------------------
windows/winsftp.c | 2 +-
47 files changed, 363 insertions(+), 440 deletions(-)
commit e053ea9a2ef828725dac992c80c3b112a9970a96
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e053ea9a2ef828725dac992c80c3b112a9970a96;hp=ad0c502cefcbc0ab039c936034c2603f5793a161
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Oct 10 19:32:41 2018 +0100
Remove two useless declarations.
One quite recent - an unused variable in the Windows code that was
obsoleted by commit cea1329b9 last month - and one not recent at all,
namely the obsolete declaration of begin_session() in putty.h that
hasn't existed since commit 7a79df8fe replaced it with the ldisc
system in *2001*!
putty.h | 1 -
windows/winnpc.c | 1 -
2 files changed, 2 deletions(-)
More information about the tartarus-commits
mailing list