summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_child.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/krb5/krb5_child.c')
-rw-r--r--src/providers/krb5/krb5_child.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 9a84684fa..56b2ac945 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -646,7 +646,8 @@ static krb5_error_code get_and_save_tgt_with_keytab(krb5_context ctx,
return kerr;
}
- kerr = create_ccache_file(ctx, princ, ccname, &creds);
+ /* Use the updated principal in the creds in case canonicalized */
+ kerr = create_ccache_file(ctx, creds.client, ccname, &creds);
if (kerr != 0) {
KRB5_DEBUG(1, kerr);
goto done;
@@ -704,7 +705,10 @@ static krb5_error_code get_and_save_tgt(struct krb5_req *kr,
}
}
- kerr = create_ccache_file(kr->ctx, kr->princ, kr->ccname, kr->creds);
+ /* Use the updated principal in the creds in case canonicalized */
+ kerr = create_ccache_file(kr->ctx,
+ kr->creds ? kr->creds->client : kr->princ,
+ kr->ccname, kr->creds);
if (kerr != 0) {
KRB5_DEBUG(1, kerr);
goto done;