Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-09-17 09:50:55 +0300
committerSimon Tatham <anakin@pobox.com>2022-09-17 09:55:08 +0300
commita95e38e9b18ce69b542a9a8c0f18ea8f4c7abb3a (patch)
tree04186dfabe80f5c9f346ef015befce20e898cd68 /ssh
parent35a87984f67ebc2db3f670cb1431f08991853a5e (diff)
GSSAPI fix: don't pass GSS_C_NO_NAME to inquire_cred_by_mech.
This was pointed out by another compiler warning. The 'name' parameter of inquire_cred_by_mech is not a gss_name_t (which is the type of GSS_C_NO_NAME); it's a gss_name_t *, because it's an _output_ parameter. We're not telling the library that we aren't _passing_ a name: we're telling it that we don't need it to _return_ us a name. So the appropriate null pointer representation is just NULL. (This was harmless apart from a compiler warning, because gss_name_t is a pointer type in turn and GSS_C_NO_NAME expands to a null pointer anyway. It was just a wrongly-typed null pointer.)
Diffstat (limited to 'ssh')
-rw-r--r--ssh/gssc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh/gssc.c b/ssh/gssc.c
index 0224afe2..d10caf8b 100644
--- a/ssh/gssc.c
+++ b/ssh/gssc.c
@@ -75,7 +75,7 @@ static Ssh_gss_stat ssh_gssapi_acquire_cred(struct ssh_gss_library *lib,
gssctx->maj_stat =
gss->inquire_cred_by_mech(&gssctx->min_stat, cred,
(gss_OID) GSS_MECH_KRB5,
- GSS_C_NO_NAME,
+ NULL,
&time_rec,
NULL,
NULL);