* g_acquire_cred.c (gss_add_cred): Maintain old default-cred
authorTom Yu <tlyu@mit.edu>
Mon, 6 Mar 2006 18:29:32 +0000 (18:29 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 6 Mar 2006 18:29:32 +0000 (18:29 +0000)
behavior by not calling display_name on GSS_C_NO_NAME.

git-svn-id: svn://anonsvn.mit.edu/krb5/users/tlyu/branches/mechglue@17701 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/mechglue/ChangeLog
src/lib/gssapi/mechglue/g_acquire_cred.c

index 9c7ec1894006761d66f5cbcb2fccfcf24aeb0fc9..10f07ee6d79e927abfb0e227258956c556ef7a6b 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-06  Tom Yu  <tlyu@mit.edu>
+
+       * g_acquire_cred.c (gss_add_cred): Maintain old default-cred
+       behavior by not calling display_name on GSS_C_NO_NAME.
+
 2004-09-22  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in: Delete @SHARED_RULE@ line.
index c0bfd3f5a305d76d657b7582fa797a4f32338469..be3c105fee3b3e24c4e2b7d3fdcf69766d85b7b0 100644 (file)
@@ -333,12 +333,15 @@ gss_add_cred(minor_status, input_cred_handle,
            internal_name = allocated_name;
        }
 
-       if ((status = mech->gss_display_name(mech->context,
-                                            &temp_minor_status, internal_name,
-                                            &union_cred->auxinfo.name,
-                                            &union_cred->auxinfo.name_type)) !=
-           GSS_S_COMPLETE)
-           goto errout;
+       if (internal_name != GSS_C_NO_NAME) {
+           status = mech->gss_display_name(mech->context,
+                                           &temp_minor_status, internal_name,
+                                           &union_cred->auxinfo.name,
+                                           &union_cred->auxinfo.name_type);
+       
+           if (status != GSS_S_COMPLETE)
+               goto errout;
+       }
     }
 
     /* now add the new credential elements */