summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kim/lib/mac/KerberosLogin.c17
1 files changed, 12 insertions, 5 deletions
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));
+ }
}
/* ------------------------------------------------------------------------ */