Skip to content

Commit

Permalink
krb5_wrap: smb_krb5_kinit_password_ccache() should always use the can…
Browse files Browse the repository at this point in the history
…onicalized principal

We should always use krb5_get_init_creds_opt_set_canonicalize()
and krb5_get_init_creds_opt_set_win2k() for heimdal
and expect the client principal to be changed.

There's no reason to have a different logic between MIT and Heimdal.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14124

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Guenther Deschner <[email protected]>
  • Loading branch information
metze-samba authored and gd committed Sep 24, 2019
1 parent 0bced73 commit 5d0bf32
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/krb5_wrap/krb5_samba.c
Original file line number Diff line number Diff line change
Expand Up @@ -2114,14 +2114,12 @@ krb5_error_code smb_krb5_kinit_password_ccache(krb5_context ctx,
return code;
}

#ifndef SAMBA4_USES_HEIMDAL /* MIT */
/*
* We need to store the principal as returned from the KDC to the
* credentials cache. If we don't do that the KRB5 library is not
* able to find the tickets it is looking for
*/
principal = my_creds.client;
#endif
code = krb5_cc_initialize(ctx, cc, principal);
if (code) {
goto done;
Expand Down

0 comments on commit 5d0bf32

Please sign in to comment.