krb5: Require krb5_c_enctype_compare is available to build with krb5
authorAndrew Bartlett <abartlet@samba.org>
Wed, 4 Jan 2012 23:46:24 +0000 (10:46 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jan 2012 20:50:07 +0000 (21:50 +0100)
source3/configure.in
source3/libsmb/clikrb5.c
source3/wscript
source4/heimdal_build/wscript_configure

index c671a42dcb1cc6b44a2d9ea93abfd0919ce289e5..1847ad2181958ca20279c9cb1281f638deda3a76 100644 (file)
@@ -3869,7 +3869,6 @@ if test x"$with_ads_support" != x"no"; then
   AC_CHECK_FUNC_EXT(krb5_krbhst_init, $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)
   AC_CHECK_FUNC_EXT(krb5_crypto_init, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_crypto_destroy, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_decode_ap_req, $KRB5_LIBS)
@@ -4419,6 +4418,11 @@ if test x"$with_ads_support" != x"no"; then
     use_ads=no
   fi
 
+  if test x"$ac_cv_func_ext_krb5_c_enctype_compare" != x"yes"; then
+    AC_MSG_WARN(krb5_c_enctype_compare not found in -lkrb5)
+    use_ads=no
+  fi
+
   if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
           x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
   then
index 6a11def19c02c254cd5d1347dfbf95a6137ea309..1bd3cede97ae926a942c5744b913badd6c60b51d 100644 (file)
@@ -471,14 +471,10 @@ bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
                                  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 ? True : False;
-#elif defined(HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS)
-       return krb5_enctypes_compatible_keys(context, enctype1, enctype2) ? True : False;
-#endif
 }
 
 static bool ads_cleanup_expired_creds(krb5_context context, 
index 1592ccbdcaa154513af29394007d1883375e43bd..903061db9da9dde6a0a8103b77fbaae514b4b1d8 100644 (file)
@@ -580,7 +580,7 @@ krb5_auth_con_setuseruserkey krb5_locate_kdc krb5_get_permitted_enctypes
 krb5_get_default_in_tkt_etypes krb5_free_data_contents
 krb5_principal_get_comp_string krb5_free_unparsed_name
 krb5_free_keytab_entry_contents krb5_kt_free_entry krb5_krbhst_init
-krb5_krbhst_get_addrinfo krb5_c_enctype_compare krb5_enctypes_compatible_keys
+krb5_krbhst_get_addrinfo krb5_c_enctype_compare
 krb5_crypto_init krb5_crypto_destroy krb5_decode_ap_req free_AP_REQ
 krb5_verify_checksum krb5_c_verify_checksum krb5_principal_compare_any_realm
 krb5_parse_name_norealm krb5_princ_size krb5_get_init_creds_opt_set_pac_request
@@ -755,6 +755,9 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
         if not conf.CONFIG_SET('HAVE_KRB5_MK_REQ_EXTENDED'):
             Logs.warn("krb5_mk_req_extended not found in -lkrb5")
             use_ads=False
+        if not conf.CONFIG_SET('HAVE_KRB5_C_ENCTYPE_COMPARE'):
+            Logs.warn("krb5_c_enctype_compare not found in -lkrb5")
+            use_ads=False
         if not conf.CONFIG_SET('HAVE_KRB5_PRINCIPAL2SALT') and \
            not conf.CONFIG_SET('HAVE_KRB5_GET_PW_SALT'):
             Logs.warn("no CREATE_KEY_FUNCTIONS detected")
index 2c111b99e87bbbcde226b797e230eed1e74df7f6..edc53dfcfc395ac7c8d62901e4ca04d5b4d46ae2 100644 (file)
@@ -103,7 +103,6 @@ conf.define('HAVE_KRB5_C_ENCTYPE_COMPARE', 1)
 conf.define('HAVE_KRB5_C_VERIFY_CHECKSUM', 1)
 conf.define('HAVE_FREE_AP_REQ', 1)
 conf.define('HAVE_KRB5_DECODE_AP_REQ', 1)
-conf.define('HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS', 1)
 conf.define('HAVE_KRB5_ENCTYPE_TO_STRING', 1)
 conf.define('HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG', 1)
 conf.define('HAVE_KRB5_FREE_ERROR_CONTENTS', 1)