set name type to GSS_C_NT_USER_NAME if NAI
authorLuke Howard <lukeh@padl.com>
Fri, 1 Apr 2011 01:15:08 +0000 (12:15 +1100)
committerLuke Howard <lukeh@padl.com>
Fri, 1 Apr 2011 01:57:24 +0000 (12:57 +1100)
This allows us to canonicalize the name easily to another mechanism, so it
can be used for protocol transition.

mech_eap/util_name.c

index 2922f98..84478fd 100644 (file)
@@ -735,6 +735,8 @@ gssEapDisplayName(OM_uint32 *minor,
 
     if (output_name_buffer->length == 0) {
         name_type = GSS_C_NT_ANONYMOUS;
+    } else if (name->flags & NAME_FLAG_NAI) {
+        name_type = GSS_C_NT_USER_NAME;
     } else {
         name_type = GSS_EAP_NT_EAP_NAME;
     }