[OpenAFS-devel] [PATCH] Openafs-1.4.1 krb5 support fails on RHEL3 due to krb5 libraries
Derek Atkins
warlord@MIT.EDU
Thu, 20 Apr 2006 12:40:28 -0400
--=-=-=
Hi,
As mentioned earlier, openafs 1.4.1 fails to build on
RHEL3 because the configure checks don't notice the EL3 kerberos
library layout properly. The attached patch continues extends
the existing krb-524 checks and if both checks fail it tries
to add -lkrb524 and checks again.
I've verified this patch works on RHEL3, RHEL4, and Fedora Cores
1, 3, and 5. (I didn't feel I needed to try FC4 as well after
all the others just worked). Unfortunately I don't have a
Heimdal system where I can check to make sure this code
continues to work.
I believe this is a minimal, relatively harmless change to
the configure glue. Note that no sources were changed in
the fixing of this problem.
This patch has been submitted as RT #30589.
-derek
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=openafs-1.4.1-krb524.patch
Content-Description: improved search for krb524 APIs
--- aclocal.m4-orig 2006-04-14 09:22:06.000000000 -0400
+++ aclocal.m4 2006-04-19 20:24:42.000000000 -0400
@@ -3360,7 +3360,31 @@
CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
save_LIBS="$LIBS"
LIBS="$LIBS $KRB5LIBS"
- AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string krb5_524_convert_creds krb524_convert_creds_kdc])
+ AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string])
+ #
+ # Check for the krb524 function. It's usually in libkrb5,
+ # but it may be in libkrb524. Check the standard libs first
+ # and then check libkrb524 if we can't find it. Note that
+ # not finding anything at all is not an error. Should it be?
+ AC_MSG_CHECKING([for krb5_524_convert_creds])
+ AC_TRY_LINK_FUNC([krb5_524_convert_creds],
+ [ AC_DEFINE(HAVE_KRB5_524_CONVERT_CREDS, 1, [have krb5_524_convert_creds()])
+ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([for krb524_convert_creds_kdc])
+ AC_TRY_LINK_FUNC([krb524_convert_creds_kdc],
+ [ AC_DEFINE(HAVE_KRB524_CONVERT_CREDS_KDC, 1, [have krb524_convert_creds_kdc()])
+ AC_MSG_RESULT([yes])],
+ [ LIBS="$LIBS -lkrb524"
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([for krb524_convert_creds_kdc in -lkrb524])
+ AC_TRY_LINK_FUNC([krb524_convert_creds_kdc],
+ [ KRB5LIBS="$KRB5LIBS -lkrb524" ;
+ AC_DEFINE(HAVE_KRB524_CONVERT_CREDS_KDC, 1, [have krb524_convert_creds_kdc()])
+ AC_MSG_RESULT([yes])
+ ], [ AC_MSG_RESULT([no]) ])
+ ])
+ ])
AC_CHECK_HEADERS([kerberosIV/krb.h])
AC_CHECK_HEADERS([kerberosV/heim_err.h])
--=-=-=
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available
--=-=-=--