From 1a8f8382740e352a83133b8c49aaedd4716210cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 27 Nov 2009 01:06:36 +0100 Subject: [PATCH] s3-kerberos: Fix Bug #6929: build with recent heimdal. Heimdal changed the KRB5_DEPRECATED define (which now may not take an identifier for activation) in new releases (like 1.3.1). Guenther --- source3/configure.in | 19 +++++++++++++++++++ source3/libsmb/clikrb5.c | 2 +- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 29016c5..693fe6a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3362,6 +3362,25 @@ if test x"$with_ads_support" != x"no"; then EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR" fi fi + + # check for new heimdal KRB5_DEPRECATED handling + + AC_CACHE_CHECK([for KRB5_DEPRECATED define taking an identifier], + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER,[ + AC_TRY_COMPILE( + [#define KRB5_DEPRECATED 1 + #include ], + [void main(void) {}], + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=yes, + samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no)]) + + if test x"$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" = x"yes"; then + AC_DEFINE(KRB5_DEPRECATED, 1, + [Whether to use deprecated krb5 interfaces]) + else + AC_DEFINE(KRB5_DEPRECATED,, + [Whether to use deprecated krb5 interfaces]) + fi fi # Now we have determined whether we really want ADS support diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 3da64d6..3dc8c64 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -21,7 +21,7 @@ */ #define KRB5_PRIVATE 1 /* this file uses PRIVATE interfaces! */ -#define KRB5_DEPRECATED 1 /* this file uses DEPRECATED interfaces! */ +/* this file uses DEPRECATED interfaces! */ #include "includes.h" -- 1.6.5.2 From 5b3a32be97a37c119e837bdee8f049684565458c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Thu, 26 Nov 2009 10:15:45 +0100 Subject: [PATCH] s3-kerberos: next step to resolve Bug #6929: build with recent heimdal. Based on patch from Allan . Also should fix the FreeBSD build on the buildfarm. Guenther --- nsswitch/winbind_krb5_locator.c | 6 +++++- source3/configure.in | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nsswitch/winbind_krb5_locator.c b/nsswitch/winbind_krb5_locator.c index 272e7db..db6e8d0 100644 --- a/nsswitch/winbind_krb5_locator.c +++ b/nsswitch/winbind_krb5_locator.c @@ -26,7 +26,11 @@ #if defined(HAVE_KRB5) && defined(HAVE_KRB5_LOCATE_PLUGIN_H) -#include +#if HAVE_COM_ERR_H +#include +#endif + +#include #include #ifndef KRB5_PLUGIN_NO_HANDLE diff --git a/source3/configure.in b/source3/configure.in index f624e0e..29016c5 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3329,7 +3329,7 @@ if test x"$with_ads_support" != x"no"; then # now check for krb5.h. Some systems have the libraries without the headers! # note that this check is done here to allow for different kerberos # include paths - AC_CHECK_HEADERS(krb5.h krb5/krb5.h) + AC_CHECK_HEADERS(krb5.h) if test x"$ac_cv_header_krb5_h" = x"no"; then @@ -3351,8 +3351,8 @@ if test x"$with_ads_support" != x"no"; then LDFLAGS=$ac_save_LDFLAGS fi AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [], -[[#ifdef HAVE_KRB5_KRB5_H - #include +[[#ifdef HAVE_KRB5_H + #include #endif ]]) -- 1.6.5.2