summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-12-14 17:38:36 -0500
committerSimo Sorce <simo@redhat.com>2015-12-14 17:38:36 -0500
commit7f6a8e0b0f54a1cb4ad734c6506122e6d391d32d (patch)
tree590633438aa3d06d07ec251391ddd88fcb3ad85a
parentea5b644ece2fcdbc7cf64a2ece55ca96e0b4563f (diff)
downloadgss-proxy-master.tar.gz
gss-proxy-master.tar.xz
gss-proxy-master.zip
Since krb5 1.14 inquire_context may return no nameHEADwipmaster
In 1.14 a patch to more officially support partially established contexts has been intrdouced. With this patch names are not returned. Cope with that by checking if a name is provided before trying to convert. Signed-off-by: Simo Sorce <simo@redhat.com>
-rw-r--r--proxy/src/gp_export.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/proxy/src/gp_export.c b/proxy/src/gp_export.c
index 0ef3128..3b9a23b 100644
--- a/proxy/src/gp_export.c
+++ b/proxy/src/gp_export.c
@@ -526,14 +526,18 @@ uint32_t gp_export_ctx_id_to_gssx(uint32_t *min, int type, gss_OID mech,
goto done;
}
- ret_maj = gp_conv_name_to_gssx(&ret_min, src_name, &out->src_name);
- if (ret_maj) {
- goto done;
+ if (src_name != GSS_C_NO_NAME) {
+ ret_maj = gp_conv_name_to_gssx(&ret_min, src_name, &out->src_name);
+ if (ret_maj) {
+ goto done;
+ }
}
- ret_maj = gp_conv_name_to_gssx(&ret_min, targ_name, &out->targ_name);
- if (ret_maj) {
- goto done;
+ if (targ_name != GSS_C_NO_NAME) {
+ ret_maj = gp_conv_name_to_gssx(&ret_min, targ_name, &out->targ_name);
+ if (ret_maj) {
+ goto done;
+ }
}
out->lifetime = lifetime_rec;