Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-RT-Original-Encoding: iso-8859-1 Content-Length: 4950

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 */