9af0d9
From 448501f1b3e0204353544ab245dd4ec77d46faae Mon Sep 17 00:00:00 2001
9af0d9
From: Simo Sorce <simo@redhat.com>
9af0d9
Date: Thu, 27 Aug 2020 17:21:03 -0400
9af0d9
Subject: [PATCH] Use static OIDs in gss_inquire_context()
9af0d9
9af0d9
As per other functions gssapi expect a static OID here.
9af0d9
9af0d9
Signed-off-by: Simo Sorce <simo@redhat.com>
9af0d9
[rharwood@redhat.com: commit message fixup]
9af0d9
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
9af0d9
(cherry picked from commit 502e448b3b126bf828ed871496dd7520d5075564)
9af0d9
(cherry picked from commit 9cc525b1f1184241483705dfc0a4162bc0c55632)
9af0d9
---
9af0d9
 src/client/gpm_inquire_context.c | 4 +++-
9af0d9
 1 file changed, 3 insertions(+), 1 deletion(-)
9af0d9
9af0d9
diff --git a/src/client/gpm_inquire_context.c b/src/client/gpm_inquire_context.c
9af0d9
index 8c683fe..5800a8d 100644
9af0d9
--- a/src/client/gpm_inquire_context.c
9af0d9
+++ b/src/client/gpm_inquire_context.c
9af0d9
@@ -51,7 +51,9 @@ OM_uint32 gpm_inquire_context(OM_uint32 *minor_status,
9af0d9
     }
9af0d9
 
9af0d9
     if (mech_type) {
9af0d9
-        ret = gp_conv_gssx_to_oid_alloc(&context_handle->mech, mech_type);
9af0d9
+        gss_OID_desc mech;
9af0d9
+        gp_conv_gssx_to_oid(&context_handle->mech, &mech);
9af0d9
+        ret = gpm_mech_to_static(&mech, mech_type);
9af0d9
         if (ret) {
9af0d9
             if (src_name) {
9af0d9
                 (void)gpm_release_name(&tmp_min, src_name);