summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2012-04-22 21:38:29 -0400
committerSimo Sorce <idra@samba.org>2012-04-23 19:20:38 -0400
commitd43c2c094558fcb83aa18358bc724195a9c26001 (patch)
tree2ad3d1b78dddbb7bea6ba28acff63c8b4dc98e91
parent08c733d75fd83fd5e32ced9712d41dd595e0f182 (diff)
downloadsamba-d43c2c094558fcb83aa18358bc724195a9c26001.tar.gz
samba-d43c2c094558fcb83aa18358bc724195a9c26001.tar.bz2
samba-d43c2c094558fcb83aa18358bc724195a9c26001.zip
krb5_samba: Add support for krb5_princ_size when using Heimdal
-rw-r--r--lib/krb5_wrap/krb5_samba.h8
-rw-r--r--source3/configure.in1
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h
index 3800b024ad..3924fb7de8 100644
--- a/lib/krb5_wrap/krb5_samba.h
+++ b/lib/krb5_wrap/krb5_samba.h
@@ -57,6 +57,14 @@
#define AP_OPTS_USE_SUBKEY 0
#endif
+#ifndef krb5_princ_size
+#if defined(HAVE_KRB5_KRB5_PRINCIPAL_GET_NUM_COMP)
+#define krb5_princ_size krb5_principal_get_num_comp
+#else
+#error krb5_princ_size unavailable
+#endif
+#endif
+
typedef struct {
#if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
krb5_address **addrs;
diff --git a/source3/configure.in b/source3/configure.in
index 56112e9ca5..70bdfc7b63 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3595,6 +3595,7 @@ if test x"$with_ads_support" != x"no"; then
AC_CHECK_FUNC_EXT(krb5_principal_compare_any_realm, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_parse_name_norealm, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_princ_size, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_principal_get_num_comp, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_set_pac_request, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_get_renewed_creds, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_free_error_contents, $KRB5_LIBS)