Subject: | gss_inquire_context cannot handle no target name from mechanism |
Date: | Tue, 22 Dec 2009 18:13:23 -0500 |
From: | "Arlene Berry" <aberry@likewise.com> |
To: | <krb5-bugs@mit.edu> |
According to RFC 2744 it is possible for gss_inquire_context to return GSS_C_NO_NAME for the target name but if a mechanism actually does it the mechglue layer segfaults. This fixes it:
Index: g_inq_context.c
===================================================================
--- g_inq_context.c (revision 23482)
+++ g_inq_context.c (working copy)
@@ -140,7 +140,8 @@
}
- if (targ_name) {
+ if (targ_name ) {
+ if (localTargName) {
status = gssint_convert_name_to_union_name(minor_status, mech,
localTargName, targ_name);
@@ -150,6 +151,10 @@
return (status);
}
+ }
+ else {
+ *targ_name = GSS_C_NO_NAME;
+ }
}
/* spec says mech type must point to static storage */