Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317614 Details for
Bug 457846
The Windows Sync API should have plug-in points
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs - part 3
cvsdiffs (text/plain), 9.32 KB, created by
Rich Megginson
on 2008-09-24 19:00:36 UTC
(
hide
)
Description:
diffs - part 3
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-09-24 19:00:36 UTC
Size:
9.32 KB
patch
obsolete
>Index: ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v >retrieving revision 1.41 >diff -u -8 -r1.41 windows_protocol_util.c >--- ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c 23 Sep 2008 21:13:22 -0000 1.41 >+++ ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c 24 Sep 2008 18:59:28 -0000 >@@ -1184,19 +1184,21 @@ > > if (is_ours && (is_user || is_group) ) { > int missing_entry = 0; > /* Make the entry's DN */ > rc = map_entry_dn_outbound(local_entry,&remote_dn,prp,&missing_entry, 1); > if (rc || NULL == remote_dn) > { > slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, >- "%s: windows_replay_update: failed map dn for %s operation dn=\"%s\"\n", >+ "%s: windows_replay_update: failed map dn for %s operation dn=\"%s\"" >+ "rc=%d remote_dn = [%s]\n", > agmt_get_long_name(prp->agmt), >- op2string(op->operation_type), op->target_address.dn); >+ op2string(op->operation_type), op->target_address.dn, >+ rc, remote_dn ? slapi_sdn_get_dn(remote_dn) : "(null)"); > goto error; > } > slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, > "%s: windows_replay_update: Processing %s operation local dn=\"%s\" remote dn=\"%s\"\n", > agmt_get_long_name(prp->agmt), > op2string(op->operation_type), op->target_address.dn, slapi_sdn_get_dn(remote_dn)); > switch (op->operation_type) { > /* >@@ -2492,31 +2494,45 @@ > * entry we generate a new DN using the entry's cn. If later, we find that > * this entry already exists, we handle that problem at the time. We don't > * check here. Note: for NT4 we always use ntUserDomainId for the samaccountname rdn, never cn. > */ > > *missing_entry = 0; > > guid = slapi_entry_attr_get_charptr(e,"ntUniqueId"); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: looking for AD entry for DS " >+ "dn=\"%s\" guid=\"%s\"\n", >+ agmt_get_long_name(prp->agmt), >+ slapi_entry_get_dn_const(e), >+ guid ? guid : "(null)"); > if (guid && guid_form) > { > int rc = 0; > Slapi_Entry *remote_entry = NULL; > new_dn = make_dn_from_guid(guid, is_nt4, suffix); > slapi_ch_free_string(&guid); > /* There are certain cases where we will have a GUID, but the entry does not exist in > * AD. This happens when you delete an entry, then add it back elsewhere in the tree > * without removing the ntUniqueID attribute. We should verify that the entry really > * exists in AD. */ > rc = windows_get_remote_entry(prp, new_dn, &remote_entry); >- slapi_sdn_free(&new_dn); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: return code %d from search " >+ "for AD entry dn=\"%s\" or dn=\"%s\"\n", >+ agmt_get_long_name(prp->agmt), rc, >+ slapi_sdn_get_dn(new_dn), >+ remote_entry ? slapi_entry_get_dn_const(remote_entry) : "(null)"); > if (0 == rc && remote_entry) { > slapi_entry_free(remote_entry); > } else { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: entry not found - rc %d\n", >+ agmt_get_long_name(prp->agmt), rc); > /* We need to re-write the DN to a non-GUID DN if we're syncing to a > * Windows 2000 Server since tombstone reanimation is not supported. > * If we're syncing with Windows 2003 Server, we'll just use the GUID > * to reanimate the tombstone when processing the add operation. */ > *missing_entry = 1; > if (!windows_private_get_iswin2k3(prp->agmt)) { > char *new_dn_string = NULL; > char *cn_string = NULL; >@@ -2547,24 +2563,37 @@ > } > } > } > } else > { > /* No GUID found, try ntUserDomainId */ > Slapi_Entry *remote_entry = NULL; > char *username = slapi_entry_attr_get_charptr(e,"ntUserDomainId"); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: looking for AD entry for DS " >+ "dn=\"%s\" username=\"%s\"\n", >+ agmt_get_long_name(prp->agmt), >+ slapi_entry_get_dn_const(e), >+ username ? username : "(null)"); > if (username) { > retval = find_entry_by_attr_value_remote("samAccountName",username,&remote_entry,prp); > if (0 == retval && remote_entry) > { > /* Get the entry's DN */ > new_dn = slapi_sdn_new(); > slapi_sdn_copy(slapi_entry_get_sdn_const(remote_entry), new_dn); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: found AD entry dn=\"%s\"\n", >+ agmt_get_long_name(prp->agmt), >+ slapi_sdn_get_dn(new_dn)); > } else { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_outbound: entry not found - rc %d\n", >+ agmt_get_long_name(prp->agmt), retval); > if (0 == retval) > { > char *new_dn_string = NULL; > char *cn_string = NULL; > > *missing_entry = 1; > /* This means that we failed to find a peer entry */ > /* In that case we need to generate the DN that we want to use */ >@@ -2699,66 +2728,107 @@ > > /* To map a non-tombstone's DN we need to first try to look it up by GUID. > * If we do not find it, then we need to generate the DN that it would have if added as a new entry. > */ > *dn = NULL; > > windows_is_remote_entry_user_or_group(e,&is_user,&is_group); > >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: looking for local entry " >+ "matching AD entry [%s]\n", >+ agmt_get_long_name(ra), >+ slapi_entry_get_dn_const(e)); > guid = extract_guid_from_entry(e, is_nt4); > if (guid) > { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: looking for local entry " >+ "by guid [%s]\n", >+ agmt_get_long_name(ra), >+ guid); > retval = find_entry_by_guid(guid,&matching_entry,ra); > if (retval) > { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: problem looking for guid: %d\n", >+ agmt_get_long_name(ra), retval); > if (ENTRY_NOTFOUND == retval) > { > } else > { > if (ENTRY_NOT_UNIQUE == retval) > { > } else > { > /* A real error */ > goto error; > } > } > } else > { > /* We found the matching entry : get its DN */ > new_dn = slapi_sdn_dup(slapi_entry_get_sdn_const(matching_entry)); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: found local entry [%s]\n", >+ agmt_get_long_name(ra), >+ slapi_sdn_get_dn(new_dn)); > } > } >+ else >+ { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: AD entry has no guid!\n", >+ agmt_get_long_name(ra)); >+ } > /* If we failed to lookup by guid, try samaccountname */ > if (NULL == new_dn) > { > username = extract_username_from_entry(e); > if (username) { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: looking for local entry " >+ "by uid [%s]\n", >+ agmt_get_long_name(ra), >+ username); > retval = find_entry_by_username(username,&matching_entry,ra); > if (retval) > { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: problem looking for username: %d\n", >+ agmt_get_long_name(ra), retval); > if (ENTRY_NOTFOUND == retval) > { > } else > { > if (ENTRY_NOT_UNIQUE == retval) > { > } else > { > /* A real error */ > goto error; > } > } > } else > { > /* We found the matching entry : get its DN */ > new_dn = slapi_sdn_dup(slapi_entry_get_sdn_const(matching_entry)); >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: found local entry by name [%s]\n", >+ agmt_get_long_name(ra), >+ slapi_sdn_get_dn(new_dn)); > } > } >+ else >+ { >+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, >+ "%s: map_entry_dn_inbound: AD entry has no username!\n", >+ agmt_get_long_name(ra)); >+ } > } > /* If we couldn't find a matching entry by either method, then we need to invent a new DN */ > if (NULL == new_dn) > { > /* The new DN has the form: uid=<samaccountname>,<sync'ed subtree> */ > /* If an entry with this DN already exists, we fail and return no DN > * this is because we don't want to second-guess what the admin wants here: > * they may want to associate this existing entry with the peer AD entry, >@@ -3801,18 +3871,23 @@ > slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: not allowed to add entry %s.\n",agmt_get_long_name(prp->agmt) > , slapi_sdn_get_dn(slapi_entry_get_sdn_const(e))); > } > } > slapi_sdn_free(&local_sdn); > } else > { > /* We should have been able to map the DN, so this is an error */ >- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: failed to map inbound entry %s.\n",agmt_get_long_name(prp->agmt) >- , slapi_sdn_get_dn(slapi_entry_get_sdn_const(e))); >+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name, >+ "%s: windows_process_dirsync_entry: failed to map " >+ "inbound entry %s - rc is %d dn is [%d].\n", >+ agmt_get_long_name(prp->agmt), >+ slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)), >+ rc, >+ local_sdn ? slapi_sdn_get_dn(local_sdn) : "null"); > } > } /* subject of agreement */ > } /* is tombstone */ > return rc; > } > > void > windows_dirsync_inc_run(Private_Repl_Protocol *prp)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 457846
:
313410
|
313411
|
313466
|
313487
|
315142
|
315153
|
316473
|
317429
|
317534
|
317540
| 317614 |
317626
|
317628