aklog: can't assume krb5_524_conv_principal based on convert_creds

add probing for krb5_524_conv_principal directly instead of
assuming finding a 524 library will find it. current heimdal
does not include it.

Change-Id: Iea523e3e7ba4cb51ec5a0d4b38fec9c7df30529d
Reviewed-on: http://gerrit.openafs.org/7551
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Derrick Brashear 2012-06-12 13:46:46 -04:00
parent 3e0eaec61e
commit 6d3390bc16
2 changed files with 7 additions and 4 deletions

View File

@ -56,6 +56,7 @@ AS_IF([test x"$KRB5_LIBS" != x],
add_to_error_table \
encode_krb5_enc_tkt_part \
encode_krb5_ticket \
krb5_524_conv_principal \
krb5_allow_weak_crypto \
krb5_c_encrypt \
krb5_decode_ticket \
@ -69,6 +70,9 @@ AS_IF([test x"$KRB5_LIBS" != x],
[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
[LIBS="-lkrb524 $LIBS"
KRB5_LIBS="-lkrb524 $KRB5_LIBS"
AC_CHECK_LIB([krb524], [krb5_524_conv_principal],
[AC_DEFINE([HAVE_KRB5_524_CONV_PRINCIPAL], 1,
[Define to 1 if you have the `krb5_524_conv_principal' function.])])
AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
[Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
AC_CHECK_HEADERS([kerberosIV/krb.h])

View File

@ -216,12 +216,11 @@ Done:
#error "Must have either keyblock or session member of krb5_creds"
#endif
#ifdef AFS_DARWIN110_ENV
#define HAVE_NO_KRB5_524 /* MITKerberosShim logs but returns success */
/* MITKerberosShim logs but returns success */
#if !defined(HAVE_KRB5_524_CONV_PRINCIPAL) || defined(AFS_DARWIN110_ENV) || (!defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC))
#define HAVE_NO_KRB5_524
#elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && defined(HAVE_KRB524_CONVERT_CREDS_KDC)
#define krb5_524_convert_creds krb524_convert_creds_kdc
#elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC)
#define HAVE_NO_KRB5_524
#endif
#if USING_HEIMDAL