From df6dcf338c4fef8428949ced3de4a28cf9282088 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 12 Feb 2010 12:23:12 +0100 Subject: [PATCH] Add check for broken LDAP connection callbacks --- server/external/ldap.m4 | 12 +++++++++++- server/man/sssd-ldap.5.xml | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/external/ldap.m4 b/server/external/ldap.m4 index ee425d8..87d95fa 100644 --- a/server/external/ldap.m4 +++ b/server/external/ldap.m4 @@ -45,9 +45,19 @@ CFLAGS="$CFLAGS $OPENLDAP_CFLAGS" LIBS="$LIBS $OPENLDAP_LIBS" AC_CHECK_FUNCS([ldap_control_create]) AC_CHECK_MEMBERS([struct ldap_conncb.lc_arg], - [AC_DEFINE([HAVE_LDAP_CONNCB], [1], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ #include ]], + [[ + struct ldap_conncb cb; + return ldap_set_option(NULL, LDAP_OPT_CONNECT_CB, &cb); + ]] )], + [AC_DEFINE([HAVE_LDAP_CONNCB], [1], [Define if LDAP connection callbacks are available])], + [AC_MSG_WARN([Found broken callback implementation])], + [])], [], [[#include ]]) + CFLAGS=$SAVE_CFLAGS LIBS=$SAVE_LIBS diff --git a/server/man/sssd-ldap.5.xml b/server/man/sssd-ldap.5.xml index 2ef5143..b79cbbc 100644 --- a/server/man/sssd-ldap.5.xml +++ b/server/man/sssd-ldap.5.xml @@ -623,7 +623,7 @@ Please note that sssd only supports referral chasing - when it is compiled with OpenLDAP version 2.4.12 or + when it is compiled with OpenLDAP version 2.4.13 or higher. -- 1.6.6