summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-10-10 12:22:51 -0600
committerRob Crittenden <rcritten@redhat.com>2008-10-13 14:09:14 -0400
commit5c56c43693b4b7a5da25777a8a441f596ed2fa84 (patch)
treed7758105a1aa08d5f4b58079790965024a71a822
parent9f18858e5826eab7430a4edb1b988ef45eaa8b65 (diff)
downloadfreeipa-5c56c43693b4b7a5da25777a8a441f596ed2fa84.tar.gz
freeipa-5c56c43693b4b7a5da25777a8a441f596ed2fa84.tar.xz
freeipa-5c56c43693b4b7a5da25777a8a441f596ed2fa84.zip
do not store the OUs from the AD DN in the IPA user entry when flattening
-rw-r--r--ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c b/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
index 4a6c80d17..9ee8805bb 100644
--- a/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
+++ b/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c
@@ -245,7 +245,6 @@ ipa_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry *rawentry,
Slapi_Attr *attr = NULL;
Slapi_Attr *e_attr = NULL;
char *type = NULL;
- PRBool flatten = PR_TRUE;
IPA_WinSync_Config *global_ipaconfig = ipa_winsync_get_config();
slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name,
@@ -261,40 +260,6 @@ ipa_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry *rawentry,
return;
}
-
- slapi_lock_mutex(global_ipaconfig->lock);
- flatten = global_ipaconfig->flatten;
- slapi_unlock_mutex(global_ipaconfig->lock);
-
- if (flatten) {
- char **rdns = NULL;
- int ii;
- /* grab the ous from the DN and store them in the entry */
- type = "ou";
- rdns = ldap_explode_dn(slapi_entry_get_dn_const(ad_entry), 0);
- for (ii = 0; rdns && rdns[ii]; ++ii) {
- /* go through the DN looking for ou= rdns */
- if (!PL_strncasecmp(rdns[ii], "ou=", 3)) {
- char *val = PL_strchr(rdns[ii], '=');
- Slapi_Value *sv = NULL;
- val++;
- sv = slapi_value_new_string(val);
- /* entry could already have this value */
- if (!slapi_entry_attr_has_syntax_value(ds_entry, type, sv)) {
- /* attr-value sv not found in ds_entry; add it */
- slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name,
- "--> ipa_winsync_pre_ds_add_user_cb -- "
- "adding val for [%s] to new entry [%s]\n",
- type, slapi_entry_get_dn_const(ds_entry));
-
- slapi_entry_add_value(ds_entry, type, sv);
- }
- slapi_value_free(&sv);
- }
- }
- ldap_value_free(rdns);
- }
-
/* add the objectclasses and attributes to the entry */
for (slapi_entry_first_attr(ipaconfig->domain_e, &attr); attr;
slapi_entry_next_attr(ipaconfig->domain_e, attr, &attr))