summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
Diffstat (limited to 'daemons')
-rw-r--r--daemons/configure.ac13
-rw-r--r--daemons/ipa-kpasswd/ipa_kpasswd.c10
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c16
-rw-r--r--daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c24
4 files changed, 8 insertions, 55 deletions
diff --git a/daemons/configure.ac b/daemons/configure.ac
index 72ff750ec..c024c12cf 100644
--- a/daemons/configure.ac
+++ b/daemons/configure.ac
@@ -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)
diff --git a/daemons/ipa-kpasswd/ipa_kpasswd.c b/daemons/ipa-kpasswd/ipa_kpasswd.c
index a8bd80023..acec3db12 100644
--- a/daemons/ipa-kpasswd/ipa_kpasswd.c
+++ b/daemons/ipa-kpasswd/ipa_kpasswd.c
@@ -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 */
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 3b5b3c8dc..d8a65f0e9 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c
@@ -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;
}
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
index bfad0cf2b..3816ff567 100644
--- a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
@@ -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);