mirror of
https://github.com/samba-team/samba.git
synced 2025-09-16 01:44:21 +03:00
krb5: Require krb5_principal_compare_any_realm be available to build with krb5
This commit is contained in:
@@ -187,35 +187,7 @@ krb5_error_code smb_krb5_unparse_name(TALLOC_CTX *mem_ctx,
|
|||||||
krb5_const_principal princ1,
|
krb5_const_principal princ1,
|
||||||
krb5_const_principal princ2)
|
krb5_const_principal princ2)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM
|
|
||||||
|
|
||||||
return krb5_principal_compare_any_realm(context, princ1, princ2);
|
return krb5_principal_compare_any_realm(context, princ1, princ2);
|
||||||
|
|
||||||
/* krb5_princ_size is a macro in MIT */
|
|
||||||
#elif defined(HAVE_KRB5_PRINC_SIZE) || defined(krb5_princ_size)
|
|
||||||
|
|
||||||
int i, len1, len2;
|
|
||||||
const krb5_data *p1, *p2;
|
|
||||||
|
|
||||||
len1 = krb5_princ_size(context, princ1);
|
|
||||||
len2 = krb5_princ_size(context, princ2);
|
|
||||||
|
|
||||||
if (len1 != len2)
|
|
||||||
return False;
|
|
||||||
|
|
||||||
for (i = 0; i < len1; i++) {
|
|
||||||
|
|
||||||
p1 = krb5_princ_component(context, (krb5_principal)discard_const(princ1), i);
|
|
||||||
p2 = krb5_princ_component(context, (krb5_principal)discard_const(princ2), i);
|
|
||||||
|
|
||||||
if (p1->length != p2->length || memcmp(p1->data, p2->data, p1->length))
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
return True;
|
|
||||||
#else
|
|
||||||
#error NO_SUITABLE_PRINCIPAL_COMPARE_FUNCTION
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void smb_krb5_checksum_from_pac_sig(krb5_checksum *cksum,
|
void smb_krb5_checksum_from_pac_sig(krb5_checksum *cksum,
|
||||||
|
@@ -4447,6 +4447,12 @@ if test x"$with_ads_support" != x"no"; then
|
|||||||
use_ads=no
|
use_ads=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$ac_cv_func_ext_krb5_principal_compare_any_realm" != x"yes"
|
||||||
|
then
|
||||||
|
AC_MSG_WARN(krb5_principal_compare_any_realm not found in -lkrb5)
|
||||||
|
use_ads=no
|
||||||
|
fi
|
||||||
|
|
||||||
if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
|
if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
|
||||||
x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
|
x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
|
||||||
then
|
then
|
||||||
|
@@ -768,6 +768,9 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
|
|||||||
if not conf.CONFIG_SET('HAVE_KRB5_GET_RENEWED_CREDS'):
|
if not conf.CONFIG_SET('HAVE_KRB5_GET_RENEWED_CREDS'):
|
||||||
Logs.warn("krb5_get_renewed_creds not found in -lkrb5")
|
Logs.warn("krb5_get_renewed_creds not found in -lkrb5")
|
||||||
use_ads=False
|
use_ads=False
|
||||||
|
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_PRINCIPAL2SALT') and \
|
if not conf.CONFIG_SET('HAVE_KRB5_PRINCIPAL2SALT') and \
|
||||||
not conf.CONFIG_SET('HAVE_KRB5_GET_PW_SALT'):
|
not conf.CONFIG_SET('HAVE_KRB5_GET_PW_SALT'):
|
||||||
Logs.warn("no CREATE_KEY_FUNCTIONS detected")
|
Logs.warn("no CREATE_KEY_FUNCTIONS detected")
|
||||||
|
Reference in New Issue
Block a user