From: Alexandra Ellwood Date: Fri, 17 Oct 2008 18:34:51 +0000 (+0000) Subject: KLCreatePrincipalFromTriplet should work with empty instance X-Git-Tag: krb5-1.7-alpha1~293 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ea4de1bb8ad087485b4eee6a1c03db826e1e9f03;p=krb5.git KLCreatePrincipalFromTriplet should work with empty instance Fixed bug where shim layer was calling kim_identity_create_from_components incorrectly in this case. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20887 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/lib/mac/KerberosLogin.c b/src/kim/lib/mac/KerberosLogin.c index 47bb14253..de05e57dd 100644 --- a/src/kim/lib/mac/KerberosLogin.c +++ b/src/kim/lib/mac/KerberosLogin.c @@ -1446,11 +1446,18 @@ KLStatus KLCreatePrincipalFromTriplet (const char *inName, const char *inRealm, KLPrincipal *outPrincipal) { - return kl_check_error (kim_identity_create_from_components (outPrincipal, - inRealm, - inName, - inInstance, - NULL)); + if (inInstance && strlen (inInstance) > 0) { + return kl_check_error (kim_identity_create_from_components (outPrincipal, + inRealm, + inName, + inInstance, + NULL)); + } else { + return kl_check_error (kim_identity_create_from_components (outPrincipal, + inRealm, + inName, + NULL)); + } } /* ------------------------------------------------------------------------ */