mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
Mozldap-specific code removed
Mozldap code removed from all sources and configure source script. Now, IPA will compile even when package mozldap-devel is not installed on the system. https://fedorahosted.org/freeipa/ticket/756
This commit is contained in:
parent
84ff4ca0f1
commit
bd965c92d8
@ -189,15 +189,10 @@ AC_ARG_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}"
|
||||
AC_DEFINE_UNQUOTED(WITH_OPENLDAP, 1, [Use OpenLDAP libraries])
|
||||
else
|
||||
LDAP_CFLAGS="${MOZLDAP_CFLAGS}"
|
||||
LDAP_LIBS="${MOZLDAP_LIBS}"
|
||||
AC_DEFINE_UNQUOTED(WITH_MOZLDAP, 1, [Use Mozilla LDAP libraries])
|
||||
fi
|
||||
LDAP_CFLAGS="${OPENLDAP_CFLAGS} $NSPR4 $NSS3 -DUSE_OPENLDAP"
|
||||
LDAP_LIBS="${OPENLDAP_LIBS}"
|
||||
AC_DEFINE_UNQUOTED(WITH_OPENLDAP, 1, [Use OpenLDAP libraries])
|
||||
|
||||
AC_SUBST(LDAP_CFLAGS)
|
||||
AC_SUBST(LDAP_LIBS)
|
||||
|
||||
|
@ -39,11 +39,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <time.h>
|
||||
#include <krb5.h>
|
||||
#ifdef WITH_MOZLDAP
|
||||
#include <mozldap/ldap.h>
|
||||
#else
|
||||
#include <ldap.h>
|
||||
#endif
|
||||
#include <sasl/sasl.h>
|
||||
#include <ifaddrs.h>
|
||||
|
||||
@ -51,12 +47,6 @@
|
||||
#define TMP_TEMPLATE "/var/cache/ipa/kpasswd/krb5_cc.XXXXXX"
|
||||
#define KPASSWD_PORT 464
|
||||
|
||||
#ifdef WITH_MOZLDAP
|
||||
/* From OpenLDAP's ldap.h */
|
||||
#define LDAP_TAG_EXOP_MODIFY_PASSWD_ID ((ber_tag_t) 0x80U)
|
||||
#define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ((ber_tag_t) 0x82U)
|
||||
#endif
|
||||
|
||||
/* blacklist entries are released only BLCAKLIST_TIMEOUT seconds
|
||||
* after the children performing the noperation has finished.
|
||||
* this is to avoid races */
|
||||
|
@ -383,21 +383,6 @@ static void pwd_values_free(Slapi_ValueSet** results,
|
||||
static int ipapwd_rdn_count(const char *dn)
|
||||
{
|
||||
int rdnc = 0;
|
||||
|
||||
#ifdef WITH_MOZLDAP
|
||||
char **edn;
|
||||
|
||||
edn = ldap_explode_dn(dn, 0);
|
||||
if (!edn) {
|
||||
LOG_TRACE("ldap_explode_dn(dn) failed ?!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (rdnc = 0; edn != NULL && edn[rdnc]; rdnc++) /* count */ ;
|
||||
ldap_value_free(edn);
|
||||
#else
|
||||
/* both ldap_explode_dn and ldap_value_free are deprecated
|
||||
* in OpenLDAP */
|
||||
LDAPDN ldn;
|
||||
int ret;
|
||||
|
||||
@ -409,7 +394,6 @@ static int ipapwd_rdn_count(const char *dn)
|
||||
|
||||
for (rdnc = 0; ldn != NULL && ldn[rdnc]; rdnc++) /* count */ ;
|
||||
ldap_dnfree(ldn);
|
||||
#endif
|
||||
|
||||
return rdnc;
|
||||
}
|
||||
|
@ -376,6 +376,10 @@ ipa_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry,
|
||||
PRBool flatten = PR_TRUE;
|
||||
IPA_WinSync_Config *ipaconfig = ipa_winsync_get_config();
|
||||
|
||||
LDAPDN ldn;
|
||||
int ret;
|
||||
char *rdn;
|
||||
|
||||
LOG("--> ipa_winsync_get_new_ds_user_dn_cb -- old dn [%s] -- begin\n",
|
||||
*new_dn_string);
|
||||
|
||||
@ -387,25 +391,6 @@ ipa_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry,
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WITH_MOZLDAP
|
||||
char **rdns = NULL;
|
||||
|
||||
rdns = ldap_explode_dn(*new_dn_string, 0);
|
||||
if (!rdns || !rdns[0]) {
|
||||
ldap_value_free(rdns);
|
||||
return;
|
||||
}
|
||||
|
||||
slapi_ch_free_string(new_dn_string);
|
||||
*new_dn_string = slapi_ch_smprintf("%s,%s", rdns[0], slapi_sdn_get_dn(ds_suffix));
|
||||
ldap_value_free(rdns);
|
||||
#else
|
||||
/* both ldap_explode_dn and ldap_value_free are deprecated
|
||||
* in OpenLDAP */
|
||||
LDAPDN ldn;
|
||||
int ret;
|
||||
char *rdn;
|
||||
|
||||
ret = ldap_str2dn(*new_dn_string, &ldn, LDAP_DN_FORMAT_LDAPV3);
|
||||
if (ret != LDAP_SUCCESS) {
|
||||
LOG_TRACE("ldap_str2dn(dn) failed ?!");
|
||||
@ -416,7 +401,6 @@ ipa_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry,
|
||||
*new_dn_string = slapi_ch_smprintf("%s,%s", rdn, slapi_sdn_get_dn(ds_suffix));
|
||||
ldap_dnfree(ldn);
|
||||
ldap_memfree(rdn);
|
||||
#endif
|
||||
|
||||
LOG("<-- ipa_winsync_get_new_ds_user_dn_cb -- new dn [%s] -- end\n",
|
||||
*new_dn_string);
|
||||
|
@ -28,7 +28,6 @@ INCLUDES = \
|
||||
$(AM_CFLAGS) \
|
||||
$(KRB5_CFLAGS) \
|
||||
$(OPENLDAP_CFLAGS) \
|
||||
$(MOZLDAP_CFLAGS) \
|
||||
$(SASL_CFLAGS) \
|
||||
$(POPT_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
@ -49,7 +48,6 @@ ipa_getkeytab_SOURCES = \
|
||||
ipa_getkeytab_LDADD = \
|
||||
$(KRB5_LIBS) \
|
||||
$(OPENLDAP_LIBS) \
|
||||
$(MOZLDAP_LIBS) \
|
||||
$(SASL_LIBS) \
|
||||
$(POPT_LIBS) \
|
||||
$(NULL)
|
||||
|
@ -32,11 +32,7 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <krb5.h>
|
||||
#ifdef WITH_MOZLDAP
|
||||
#include <mozldap/ldap.h>
|
||||
#else
|
||||
#include <ldap.h>
|
||||
#endif
|
||||
#include <sasl/sasl.h>
|
||||
#include <popt.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user