From: Tom Yu Date: Mon, 6 Mar 2006 18:29:32 +0000 (+0000) Subject: * g_acquire_cred.c (gss_add_cred): Maintain old default-cred X-Git-Tag: ms-bug-test-20060525~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d0d1154fa4787719d8693beb92c63ac11ac5147;p=krb5.git * g_acquire_cred.c (gss_add_cred): Maintain old default-cred 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 --- diff --git a/src/lib/gssapi/mechglue/ChangeLog b/src/lib/gssapi/mechglue/ChangeLog index 9c7ec1894..10f07ee6d 100644 --- a/src/lib/gssapi/mechglue/ChangeLog +++ b/src/lib/gssapi/mechglue/ChangeLog @@ -1,3 +1,8 @@ +2006-03-06 Tom Yu + + * 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 * Makefile.in: Delete @SHARED_RULE@ line. diff --git a/src/lib/gssapi/mechglue/g_acquire_cred.c b/src/lib/gssapi/mechglue/g_acquire_cred.c index c0bfd3f5a..be3c105fe 100644 --- a/src/lib/gssapi/mechglue/g_acquire_cred.c +++ b/src/lib/gssapi/mechglue/g_acquire_cred.c @@ -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 */