krb5: Require krb5_string_to_key be available to build with krb5
authorAndrew Bartlett <abartlet@samba.org>
Thu, 5 Jan 2012 00:39:14 +0000 (11:39 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jan 2012 20:50:07 +0000 (21:50 +0100)
libcli/auth/krb5_wrap.c
source3/configure.in
source3/wscript

index a16a7cdffa61df5ceaf24a92b564fbfd09bc874c..f528822b1984896b432c2e5032cbf85eda7c1ea7 100644 (file)
@@ -27,7 +27,7 @@
 #include "libcli/auth/krb5_wrap.h"
 #include "librpc/gen_ndr/krb5pac.h"
 
-#if defined(HAVE_KRB5_PRINCIPAL2SALT) && defined(HAVE_KRB5_USE_ENCTYPE) && defined(HAVE_KRB5_STRING_TO_KEY) && defined(HAVE_KRB5_ENCRYPT_BLOCK)
+#if defined(HAVE_KRB5_PRINCIPAL2SALT) && defined(HAVE_KRB5_USE_ENCTYPE) && defined(HAVE_KRB5_ENCRYPT_BLOCK)
 int create_kerberos_key_from_string_direct(krb5_context context,
                                                  krb5_principal host_princ,
                                                  krb5_data *password,
index 153a61050184dd031142e49724d0c08503b2316d..18c6250361947bebdfcfc63504bb5a3bc823204e 100644 (file)
@@ -4464,6 +4464,12 @@ if test x"$with_ads_support" != x"no"; then
     use_ads=no
   fi
 
+  if test x"$ac_cv_func_ext_krb5_string_to_key" != x"yes"
+  then
+    AC_MSG_WARN(krb5_string_to_key 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 00da1948a6fe3f4008871919f34b8fcc11f52045..35f2b7902419e0ec51ff99b6a91df916581484a7 100644 (file)
@@ -771,6 +771,9 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
         if not conf.CONFIG_SET('HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM'):
             Logs.warn("krb5_principal_compare_any_realm not found in -lkrb5")
             use_ads=False
+        if not conf.CONFIG_SET('HAVE_KRB5_STRING_TO_KEY'):
+            Logs.warn("krb5_string_to_key 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")