summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-12-03 15:02:29 -0500
committerSimo Sorce <ssorce@redhat.com>2010-12-06 12:23:09 -0500
commit37f48c0019c64f20bfc24b021442b643eaf86aab (patch)
tree416ce19e54ddc2e1efa88beac4978124676c7d85
parentfee9fae941bd747d7f2f22f2b95626107b11049f (diff)
downloadfreeipa-37f48c0019c64f20bfc24b021442b643eaf86aab.tar.gz
freeipa-37f48c0019c64f20bfc24b021442b643eaf86aab.tar.xz
freeipa-37f48c0019c64f20bfc24b021442b643eaf86aab.zip
Make use of mozldap vs openldap for plugins selectable
-rw-r--r--daemons/configure.ac21
-rw-r--r--daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h2
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-version/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c3
-rw-r--r--ipa.spec.in4
11 files changed, 40 insertions, 18 deletions
diff --git a/daemons/configure.ac b/daemons/configure.ac
index d959f987a..221a63a7f 100644
--- a/daemons/configure.ac
+++ b/daemons/configure.ac
@@ -137,11 +137,9 @@ fi
AC_SUBST(KRB5_LIBS)
dnl ---------------------------------------------------------------------------
-dnl - Check for Mozilla LDAP *and* OpenLDAP SDK
+dnl - Check for Mozilla LDAP and OpenLDAP SDK
dnl ---------------------------------------------------------------------------
-dnl The mozldap libraries are always needed because ipa-slapi-plugins/dna/
-dnl will not build against OpenLDAP.
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$NSPR4 $NSS3"
AC_CHECK_HEADER(svrcore.h)
@@ -193,6 +191,21 @@ AC_SUBST(OPENLDAP_LIBS)
OPENLDAP_CFLAGS="${OPENLDAP_CFLAGS} -DWITH_OPENLDAP"
AC_SUBST(OPENLDAP_CFLAGS)
+AC_ARG_WITH([openldap],
+ [AS_HELP_STRING([--with-openldap],
+ [compile plugins with openldap instead of mozldap])],
+ [], [])
+
+if test "x$with_openldap" == xyes; then
+ LDAP_CFLAGS="${OPENLDAP_CFLAGS} $NSPR4 $NSS3 -DUSE_OPENLDAP"
+ LDAP_LIBS="${OPENLDAP_LIBS}"
+else
+ LDAP_CFLAGS="${MOZLDAP_CFLAGS}"
+ LDAP_LIBS="${MOZLDAP_LIBS}"
+fi
+AC_SUBST(LDAP_CFLAGS)
+AC_SUBST(LDAP_LIBS)
+
dnl ---------------------------------------------------------------------------
dnl - Check for OpenSSL Crypto library
dnl ---------------------------------------------------------------------------
@@ -312,7 +325,7 @@ echo "
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
- LDAP libs: ${OPENLDAP_LIBS}
+ LDAP libs: ${LDAP_LIBS}
KRB5 libs: ${KRB5_LIBS}
OpenSSL libs: ${SSL_LIBS}
Maintainer mode: ${USE_MAINTAINER_MODE}
diff --git a/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am b/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am
index d041815a2..c3bb27959 100644
--- a/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -29,7 +29,7 @@ libipa_enrollment_extop_la_SOURCES = \
libipa_enrollment_extop_la_LDFLAGS = -avoid-version
libipa_enrollment_extop_la_LIBADD = \
- $(MOZLDAP_LIBS) \
+ $(LDAP_LIBS) \
$(NULL)
appdir = $(IPA_DATA_DIR)
diff --git a/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am b/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am
index b79868748..5d9db51f4 100644
--- a/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am
@@ -13,7 +13,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -29,7 +29,7 @@ libipa_modrdn_la_SOURCES = \
libipa_modrdn_la_LDFLAGS = -avoid-version
libipa_modrdn_la_LIBADD = \
- $(MOZLDAP_LIBS) \
+ $(LDAP_LIBS) \
$(NULL)
appdir = $(IPA_DATA_DIR)
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
index 41d9f2378..1daf942da 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
@@ -15,7 +15,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(SSL_CFLAGS) \
$(WARN_CFLAGS) \
@@ -39,7 +39,7 @@ libipa_pwd_extop_la_LDFLAGS = -avoid-version
libipa_pwd_extop_la_LIBADD = \
$(KRB5_LIBS) \
$(SSL_LIBS) \
- $(MOZLDAP_LIBS) \
+ $(LDAP_LIBS) \
$(NULL)
appdir = $(IPA_DATA_DIR)
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h
index bc521071e..28833eaf9 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h
@@ -49,6 +49,8 @@
#include <unistd.h>
#include <stdbool.h>
+#define LDAP_DEPRECATED 1
+
#include <prio.h>
#include <ssl.h>
#include <dirsrv/slapi-plugin.h>
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c
index 31ecb1e42..acb5cdbcc 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c
@@ -206,8 +206,8 @@ static struct ipapwd_krbcfg *ipapwd_getConfig(void)
goto free_and_error;
}
- be = ber_init(bval);
- if (!bval) {
+ be = ber_init(discard_const(bval));
+ if (!be) {
LOG_FATAL("ber_init() failed!\n");
goto free_and_error;
}
diff --git a/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am b/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am
index 7c3709b5a..15e6dedb8 100644
--- a/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am
@@ -13,7 +13,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -29,7 +29,7 @@ libipa_uuid_la_SOURCES = \
libipa_uuid_la_LDFLAGS = -avoid-version
libipa_uuid_la_LIBADD = \
- $(MOZLDAP_LIBS) \
+ $(LDAP_LIBS) \
$(UUID_LIBS) \
$(NULL)
diff --git a/daemons/ipa-slapi-plugins/ipa-version/Makefile.am b/daemons/ipa-slapi-plugins/ipa-version/Makefile.am
index d26a7d24e..c7317ecdf 100644
--- a/daemons/ipa-slapi-plugins/ipa-version/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-version/Makefile.am
@@ -14,7 +14,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -31,7 +31,7 @@ libipa_repl_version_la_SOURCES = \
libipa_repl_version_la_LDFLAGS = -avoid-version
libipa_repl_version_la_LIBADD = \
- $(MOZLDAP_LIBS) \
+ $(LDAP_LIBS) \
$(NULL)
appdir = $(IPA_DATA_DIR)
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am b/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am
index 82a934a22..2d4b5a447 100644
--- a/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
- $(MOZLDAP_CFLAGS) \
+ $(LDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
@@ -29,7 +29,7 @@ libipa_winsync_la_SOURCES = \
libipa_winsync_la_LDFLAGS = -avoid-version
#libipa_winsync_la_LIBADD = \
-# $(MOZLDAP_LIBS) \
+# $(LDAP_LIBS) \
# $(NULL)
appdir = $(IPA_DATA_DIR)
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
index ecdda238f..9fe213158 100644
--- a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
@@ -41,6 +41,8 @@
# include <config.h>
#endif
+#define LDAP_DEPRECATED 1
+
/*
* Windows Synchronization Plug-in for IPA
* This plugin allows IPA to intercept operations sent from
@@ -60,6 +62,7 @@
#include "ipa-winsync.h"
#include <string.h>
+#include <stdlib.h>
#include "plstr.h"
static void
diff --git a/ipa.spec.in b/ipa.spec.in
index 8bc636f3c..2597dad85 100644
--- a/ipa.spec.in
+++ b/ipa.spec.in
@@ -226,7 +226,11 @@ export CPPFLAGS="$CPPFLAGS %{optflags}"
make version-update
cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
%if ! %{ONLY_CLIENT}
+%if 0%{?fedora} >= 14
+cd daemons; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir} --with-openldap; cd ..
+%else
cd daemons; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
+%endif
cd install; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
%endif