simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Apr 11 18:57:23 BST 2017
TL;DR:
802b4ed Fixed GSSAPI authentication.
3ff3be3 Fix loading of SSPICLI.DLL by SECUR32.DLL.
49fb598 Add automatic type-checking to GET_WINDOWS_FUNCTION.
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: 2017-04-11 18:57:23
commit 802b4edf4d59a04e903fc8ef5342e25b6a566dc6
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=802b4edf4d59a04e903fc8ef5342e25b6a566dc6;hp=d2653e79aba277f5d8249c421a7c342e08548403
Author: Christopher Odenbach <odenbach at uni-paderborn.de>
Date: Mon Apr 3 21:30:18 2017 +0200
Fixed GSSAPI authentication.
gssapi32.dll from MIT Kerberos as well as from Heimdal both load
further DLLs from their installation directories.
[SGT: I polished the original patch a bit, in particular replacing
manual memory allocation with dup_mb_to_wc. This required a Recipe
change to link miscucs.c and winucs.c into more of the tools.]
Recipe | 6 +++---
windows/wingss.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
windows/winmisc.c | 6 ++++--
windows/winstuff.h | 15 +++++++++++++++
4 files changed, 70 insertions(+), 8 deletions(-)
commit 3ff3be38822d9735f065bc0fb41fecc72721e78c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3ff3be38822d9735f065bc0fb41fecc72721e78c;hp=802b4edf4d59a04e903fc8ef5342e25b6a566dc6
Author: Christopher Odenbach <odenbach at uni-paderborn.de>
Date: Tue Apr 11 14:04:00 2017 +0200
Fix loading of SSPICLI.DLL by SECUR32.DLL.
If MIT Kerberos is installed, then using GetProcAddress to extract
GetUserNameExA() from secur32.dll causes Windows to implicitly load
sspicli.dll in turn - and it does it in a search-path-unclean way.
If we load it in our own way before that happens, then Windows doesn't
need to load it again and won't do so wrongly.
[SGT: tidied up commit message from original patch]
windows/winmisc.c | 5 +++++
1 file changed, 5 insertions(+)
commit 49fb598b0e78d09d6a2a42679ee0649df482090e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=49fb598b0e78d09d6a2a42679ee0649df482090e;hp=3ff3be38822d9735f065bc0fb41fecc72721e78c
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Apr 11 18:56:55 2017 +0100
Add automatic type-checking to GET_WINDOWS_FUNCTION.
This gives me an extra safety-check against having mistyped one of the
function prototypes that we load at run time from DLLs: we verify that
the typedef we defined based on the prototype in our source code
matches the type of the real function as declared in the Windows
headers.
This was an idea I had while adding a pile of further functions using
this mechanism. It didn't catch any errors (either in the new
functions or in the existing collection), but that's no reason not to
keep it anyway now that I've thought of it!
In VS2015, this automated type-check works for most functions, but a
couple manage to break it. SetCurrentProcessExplicitAppUserModelID in
winjump.c can't be type-checked, because including <shobjidl.h> where
that function is declared would also bring in a load of other stuff
that conflicts with the painful manual COM declarations in winjump.c.
(That stuff could probably be removed now we're on an up-to-date
Visual Studio, on the other hand, but that's a separate chore.) And
gai_strerror, used in winnet.c, does _have_ an implementation in a
DLL, but the header files like to provide an inline version with a
different calling convention, which defeats this error-checking trick.
And in the older VS2003 that we still precautionarily build with,
several more type-checks have to be #ifdeffed out because the
functions they check against just aren't there at all.
windows/wingss.c | 5 +++++
windows/winhsock.c | 10 +++++++++-
windows/winjump.c | 8 +++++++-
windows/winmisc.c | 7 +++++++
windows/winnet.c | 14 ++++++++++++--
windows/winstuff.h | 21 +++++++++++++++------
6 files changed, 55 insertions(+), 10 deletions(-)
More information about the tartarus-commits
mailing list