Blame SOURCES/krb5-1.14-inquire_context_no_name.patch

2c9800
From 14ecfa9fe9e843bdb2eb09c60a5ec592c8de4cdc Mon Sep 17 00:00:00 2001
2c9800
From: Simo Sorce <simo@redhat.com>
2c9800
Date: Mon, 14 Dec 2015 17:38:36 -0500
2c9800
Subject: [PATCH 1/2] Since krb5 1.14 inquire_context may return no name
2c9800
2c9800
In 1.14 a patch to more officially support partially established contexts
2c9800
has been intrdouced. With this patch names are not returned.
2c9800
2c9800
Cope with that by checking if a name is provided before trying to convert.
2c9800
2c9800
Signed-off-by: Simo Sorce <simo@redhat.com>
2c9800
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
2c9800
---
2c9800
 proxy/src/gp_export.c | 16 ++++++++++------
2c9800
 1 file changed, 10 insertions(+), 6 deletions(-)
2c9800
2c9800
diff --git a/proxy/src/gp_export.c b/proxy/src/gp_export.c
2c9800
index 0ef3128..3b9a23b 100644
2c9800
--- a/proxy/src/gp_export.c
2c9800
+++ b/proxy/src/gp_export.c
2c9800
@@ -526,14 +526,18 @@ uint32_t gp_export_ctx_id_to_gssx(uint32_t *min, int type, gss_OID mech,
2c9800
         goto done;
2c9800
     }
2c9800
 
2c9800
-    ret_maj = gp_conv_name_to_gssx(&ret_min, src_name, &out->src_name);
2c9800
-    if (ret_maj) {
2c9800
-        goto done;
2c9800
+    if (src_name != GSS_C_NO_NAME) {
2c9800
+        ret_maj = gp_conv_name_to_gssx(&ret_min, src_name, &out->src_name);
2c9800
+        if (ret_maj) {
2c9800
+            goto done;
2c9800
+        }
2c9800
     }
2c9800
 
2c9800
-    ret_maj = gp_conv_name_to_gssx(&ret_min, targ_name, &out->targ_name);
2c9800
-    if (ret_maj) {
2c9800
-        goto done;
2c9800
+    if (targ_name != GSS_C_NO_NAME) {
2c9800
+        ret_maj = gp_conv_name_to_gssx(&ret_min, targ_name, &out->targ_name);
2c9800
+        if (ret_maj) {
2c9800
+            goto done;
2c9800
+        }
2c9800
     }
2c9800
 
2c9800
     out->lifetime = lifetime_rec;
2c9800
-- 
2c9800
2.6.4
2c9800