From a95e38e9b18ce69b542a9a8c0f18ea8f4c7abb3a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 17 Sep 2022 07:50:55 +0100 Subject: [PATCH] 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.) --- ssh/gssc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);