s3: fixed krb5 build problem on ubuntu karmic
authorAndrew Tridgell <tridge@samba.org>
Thu, 15 Oct 2009 23:40:50 +0000 (10:40 +1100)
committerMichael Adam <obnox@samba.org>
Mon, 22 Mar 2010 16:48:01 +0000 (17:48 +0100)
Karmic has MIT krb5 1.7-beta3, which has the symbol
krb5_auth_con_set_req_cksumtype but no prototype for it.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531635
(cherry picked from commit a6e4cb500b4162cae1d906a1762507370b4ee89e)

Part of a fix for bug #6918.
(cherry picked from commit 1c34ec61f968a65709e3672be2ce5a1aa0752470)

source3/configure.in
source3/libsmb/clikrb5.c

index 5ac18f8a707aaf570fa1ebd29a8e255f2e09c3ee..6b1fad68b816ec8aac1d3e65982ad4e8de385efa 100644 (file)
@@ -3403,6 +3403,10 @@ if test x"$with_ads_support" != x"no"; then
   AC_CHECK_FUNC_EXT(krb5_fwd_tgt_creds, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_auth_con_set_req_cksumtype, $KRB5_LIBS)
 
+  # MIT krb5 1.7beta3 (in Ubuntu Karmic) does not have this declaration
+  # but does have the symbol
+  AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include <krb5.h>])
+
   LIBS="$KRB5_LIBS $LIBS"
 
   AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype,
index aa98d7668f1894e6533e8dc6587c1298cad43414..76d99c1f2ddbea7dc1ab5aea2de54a7b16a410db 100644 (file)
@@ -1853,6 +1853,15 @@ static krb5_error_code ads_krb5_get_fwd_ticket( krb5_context context,
        char *pChksum = NULL;
        char *p = NULL;
 
+/* MIT krb5 1.7beta3 (in Ubuntu Karmic) is missing the prototype,
+   but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+krb5_error_code krb5_auth_con_set_req_cksumtype(  
+       krb5_context     context,
+       krb5_auth_context      auth_context,  
+       krb5_cksumtype     cksumtype);
+#endif
+
        ZERO_STRUCT(fwdData);
        ZERO_STRUCTP(authenticator);