diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-01-14 13:41:05 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-01-14 17:33:11 -0500 |
commit | bd965c92d829f9d88f4e29f37890c9beffbd716d (patch) | |
tree | a90c0ae3ac8079de2fd8eb1bf2d077e3d0aadadb /daemons/ipa-slapi-plugins | |
parent | 84ff4ca0f1272bff2f3046db53d1ce4007f46e15 (diff) | |
download | freeipa-bd965c92d829f9d88f4e29f37890c9beffbd716d.tar.gz freeipa-bd965c92d829f9d88f4e29f37890c9beffbd716d.tar.xz freeipa-bd965c92d829f9d88f4e29f37890c9beffbd716d.zip |
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
Diffstat (limited to 'daemons/ipa-slapi-plugins')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_common.c | 16 | ||||
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c | 24 |
2 files changed, 4 insertions, 36 deletions
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); |