Skip to content

Commit

Permalink
Pass client flag to KDB for client preauth match
Browse files Browse the repository at this point in the history
In the kdcpreauth match_client() callback, if it is necessary to look
up the given principal in the KDB, pass KRB5_KDB_FLAG_CLIENT to
krb5_db_get_principal().  Samba requires this flag to properly handle
enterprise client principals.

ticket: 9048 (new)
  • Loading branch information
greghudson committed Jan 27, 2022
1 parent 78fd669 commit d4359c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kdc/kdc_preauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ match_client(krb5_context context, krb5_kdcpreauth_rock rock,
krb5_principal_compare(context, princ, client))
return TRUE;

if (krb5_db_get_principal(context, princ, 0, &ent))
if (krb5_db_get_principal(context, princ, KRB5_KDB_FLAG_CLIENT, &ent))
return FALSE;
match = krb5_principal_compare(context, ent->princ, client);
krb5_db_free_principal(context, ent);
Expand Down

0 comments on commit d4359c6

Please sign in to comment.