From 6d3390bc16281e6f889bb555abb1182985556287 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 12 Jun 2012 13:46:46 -0400 Subject: [PATCH] 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 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- configure.ac | 4 ++++ src/aklog/aklog.c | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 35c8694351..3eb836fcee 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/src/aklog/aklog.c b/src/aklog/aklog.c index 43db12f351..4e2b2debc2 100644 --- a/src/aklog/aklog.c +++ b/src/aklog/aklog.c @@ -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