[krbdev.mit.edu #6600] gss_inquire_context cannot handle no target name from mechanism
Arlene Berry via RT
rt-comment at krbdev.mit.edu
Tue Dec 22 18:19:53 EST 2009
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 */
More information about the krb5-bugs
mailing list