summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-10-29 00:02:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:05 -0500
commitb57feea6d312de778e232f478d768ac5f3552b3e (patch)
tree1db74a4791960be4d55dbfa0547e31bf8ac58740
parent13542c7b5058d1fa0817ae9f371e013157b471d0 (diff)
downloadsamba-b57feea6d312de778e232f478d768ac5f3552b3e.tar.gz
samba-b57feea6d312de778e232f478d768ac5f3552b3e.tar.bz2
samba-b57feea6d312de778e232f478d768ac5f3552b3e.zip
r3345: More MIT/Heimdal tests for comparing enctypes now.
Jeremy. (This used to be commit eefb911d0c66bdee586a86446e16723013f84101)
-rw-r--r--source3/configure.in2
-rw-r--r--source3/libsmb/clikrb5.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index da60e284ec..2b31d24e23 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 291aa13de0..5aa1668705 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)