Blame SOURCES/Pass-gss_localname-through-SPNEGO.patch

287c72
From e57cdf6610f0b7c8ac38f9b2342b74b8c9e5bc54 Mon Sep 17 00:00:00 2001
31ace6
From: Greg Hudson <ghudson@mit.edu>
31ace6
Date: Sun, 26 Apr 2020 19:55:54 -0400
31ace6
Subject: [PATCH] Pass gss_localname() through SPNEGO
31ace6
31ace6
ticket: 8897 (new)
31ace6
(cherry picked from commit f7b8a6432bd289bdc528017be122305f95b8e285)
31ace6
(cherry picked from commit 646212314a580a8cdffdacda9cb3c8f806471b08)
31ace6
---
31ace6
 src/lib/gssapi/spnego/gssapiP_spnego.h | 8 ++++++++
31ace6
 src/lib/gssapi/spnego/spnego_mech.c    | 9 ++++++++-
31ace6
 2 files changed, 16 insertions(+), 1 deletion(-)
31ace6
31ace6
diff --git a/src/lib/gssapi/spnego/gssapiP_spnego.h b/src/lib/gssapi/spnego/gssapiP_spnego.h
31ace6
index a93763314..066ec736f 100644
31ace6
--- a/src/lib/gssapi/spnego/gssapiP_spnego.h
31ace6
+++ b/src/lib/gssapi/spnego/gssapiP_spnego.h
31ace6
@@ -357,6 +357,14 @@ OM_uint32 KRB5_CALLCONV spnego_gss_wrap_size_limit
31ace6
 	OM_uint32	*max_input_size
31ace6
 );
31ace6
 
31ace6
+OM_uint32 KRB5_CALLCONV spnego_gss_localname
31ace6
+(
31ace6
+	OM_uint32 *minor_status,
31ace6
+	const gss_name_t pname,
31ace6
+	const gss_const_OID mech_type,
31ace6
+	gss_buffer_t localname
31ace6
+);
31ace6
+
31ace6
 OM_uint32 KRB5_CALLCONV spnego_gss_get_mic
31ace6
 (
31ace6
 	OM_uint32 *minor_status,
31ace6
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c
31ace6
index ec0bae6a4..594fc5894 100644
31ace6
--- a/src/lib/gssapi/spnego/spnego_mech.c
31ace6
+++ b/src/lib/gssapi/spnego/spnego_mech.c
31ace6
@@ -237,7 +237,7 @@ static struct gss_config spnego_mechanism =
31ace6
 	spnego_gss_inquire_context,	/* gss_inquire_context */
31ace6
 	NULL,				/* gss_internal_release_oid */
31ace6
 	spnego_gss_wrap_size_limit,	/* gss_wrap_size_limit */
31ace6
-	NULL,				/* gssd_pname_to_uid */
31ace6
+	spnego_gss_localname,
31ace6
 	NULL,				/* gss_userok */
31ace6
 	NULL,				/* gss_export_name */
31ace6
 	spnego_gss_duplicate_name,	/* gss_duplicate_name */
31ace6
@@ -2371,6 +2371,13 @@ spnego_gss_wrap_size_limit(
31ace6
 	return (ret);
31ace6
 }
31ace6
 
31ace6
+OM_uint32 KRB5_CALLCONV
31ace6
+spnego_gss_localname(OM_uint32 *minor_status, const gss_name_t pname,
31ace6
+		     const gss_const_OID mech_type, gss_buffer_t localname)
31ace6
+{
31ace6
+	return gss_localname(minor_status, pname, GSS_C_NO_OID, localname);
31ace6
+}
31ace6
+
31ace6
 OM_uint32 KRB5_CALLCONV
31ace6
 spnego_gss_get_mic(
31ace6
 		OM_uint32 *minor_status,