From f2b821abca72e0d444c96598799c4947e2173d3f Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Jun 02 2023 20:01:41 +0000 Subject: ipa-kdb: be compatible with krb5 1.19 when checking for server referral Related: https://pagure.io/freeipa/issue/9164 Signed-off-by: Alexander Bokovoy Reviewed-By: Florence Blanc-Renaud --- diff --git a/daemons/ipa-kdb/ipa_kdb_principals.c b/daemons/ipa-kdb/ipa_kdb_principals.c index f4148b1..3d72259 100644 --- a/daemons/ipa-kdb/ipa_kdb_principals.c +++ b/daemons/ipa-kdb/ipa_kdb_principals.c @@ -1539,6 +1539,14 @@ done: return kerr; } +/* For krb5 1.19, there is no KRB5_KDB_FLAG_REFERRAL_OK, emulate it + * See krb5 commit a441fbe329ebbd7775eb5d4ccc4a05eef370f08b */ +#ifndef KRB5_KDB_FLAG_REFERRAL_OK +#ifdef KRB5_KDB_FLAG_CANONICALIZE +#define KRB5_KDB_FLAG_REFERRAL_OK KRB5_KDB_FLAG_CANONICALIZE +#endif +#endif + static krb5_error_code dbget_alias(krb5_context kcontext, struct ipadb_context *ipactx, krb5_const_principal search_for,