From b57feea6d312de778e232f478d768ac5f3552b3e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Oct 2004 00:02:32 +0000 Subject: [PATCH] r3345: More MIT/Heimdal tests for comparing enctypes now. Jeremy. (This used to be commit eefb911d0c66bdee586a86446e16723013f84101) --- source3/configure.in | 2 ++ source3/libsmb/clikrb5.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/source3/configure.in b/source3/configure.in index da60e284eca..2b31d24e23b 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2784,6 +2784,8 @@ if test x"$with_ads_support" != x"no"; then AC_CHECK_FUNC_EXT(krb5_free_keytab_entry_contents, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_kt_free_entry, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_krbhst_get_addrinfo, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_c_enctype_compare, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_enctypes_compatible_keys, $KRB5_LIBS) LIBS="$LIBS $KRB5_LIBS" diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 291aa13de01..5aa16687054 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -262,6 +262,20 @@ void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype) #endif } +krb5_boolean kerberos_compatible_enctypes(krb5_context context, + krb5_enctype enctype1, + krb5_enctype enctype2) +{ +#if defined(HAVE_KRB5_C_ENCTYPE_COMPARE) + krb5_boolean similar = 0; + + krb5_c_enctype_compare(context, enctype1, enctype2, &similar); + return similar; +#elif defined(HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS) + return krb5_enctypes_compatible_keys(context, enctype1, enctype2); +#endif +} + static BOOL ads_cleanup_expired_creds(krb5_context context, krb5_ccache ccache, krb5_creds *credsp) -- 2.34.1