From 19deda26d0ee61b5e5b41a09181d156b9159663d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 5 Jan 2012 11:39:14 +1100 Subject: [PATCH] krb5: Require krb5_string_to_key be available to build with krb5 --- libcli/auth/krb5_wrap.c | 2 +- source3/configure.in | 6 ++++++ source3/wscript | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libcli/auth/krb5_wrap.c b/libcli/auth/krb5_wrap.c index a16a7cdffa6..f528822b198 100644 --- a/libcli/auth/krb5_wrap.c +++ b/libcli/auth/krb5_wrap.c @@ -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, diff --git a/source3/configure.in b/source3/configure.in index 153a6105018..18c62503619 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/wscript b/source3/wscript index 00da1948a6f..35f2b790241 100644 --- a/source3/wscript +++ b/source3/wscript @@ -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") -- 2.11.4.GIT