Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23522/plugins/replication
Modified Files: windows_protocol_util.c windows_tot_protocol.c Log Message: Resolves: 207567 Summary: Corrected search scope used to find entries to sync in winsync total update protocol.
Index: windows_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- windows_protocol_util.c 30 Aug 2007 15:56:35 -0000 1.30 +++ windows_protocol_util.c 4 Sep 2007 15:45:57 -0000 1.31 @@ -3028,23 +3028,11 @@ return retval; }
-static int -windows_process_total_delete(Private_Repl_Protocol *prp,Slapi_Entry *e, Slapi_DN* remote_dn) -{ - int retval = 0; - if (delete_remote_entry_allowed(e)) - { - retval = windows_conn_send_delete(prp->conn, slapi_sdn_get_dn(remote_dn), NULL, NULL /* returned controls */); - } - return retval; -} - /* Entry point for the total protocol */ int windows_process_total_entry(Private_Repl_Protocol *prp,Slapi_Entry *e) { int retval = 0; int is_ours = 0; - int is_tombstone = 0; Slapi_DN *remote_dn = NULL; int missing_entry = 0; const Slapi_DN *local_dn = slapi_entry_get_sdn_const(e); @@ -3063,14 +3051,7 @@ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(local_dn)); goto error; } - /* Either the entry is a tombstone, or not a tombstone */ - if (is_tombstone) - { - retval = windows_process_total_delete(prp,e,remote_dn); - } else - { - retval = windows_process_total_add(prp,e,remote_dn,missing_entry); - } + retval = windows_process_total_add(prp,e,remote_dn,missing_entry); } if (remote_dn) {
Index: windows_tot_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- windows_tot_protocol.c 10 Nov 2006 23:45:17 -0000 1.9 +++ windows_tot_protocol.c 4 Sep 2007 15:45:57 -0000 1.10 @@ -171,8 +171,10 @@ dn = slapi_sdn_get_dn( windows_private_get_directory_subtree(prp->agmt));
pb = slapi_pblock_new (); - slapi_search_internal_set_pb (pb, dn, /* XXX modify the searchfilter and scope? */ - LDAP_SCOPE_ONELEVEL, "(|(objectclass=ntuser)(objectclass=ntgroup)(nsuniqueid=*))", NULL, 0, NULL, NULL, + /* Perform a subtree search for any ntuser or ntgroup entries underneath the + * suffix defined in the sync agreement. */ + slapi_search_internal_set_pb (pb, dn, + LDAP_SCOPE_SUBTREE, "(|(objectclass=ntuser)(objectclass=ntgroup))", NULL, 0, NULL, NULL, repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION), 0); cb_data.prp = prp; cb_data.rc = 0; @@ -180,8 +182,6 @@ cb_data.sleep_on_busy = 0UL; cb_data.last_busy = current_time ();
- /* this search get all the entries from the replicated area including tombstones - and referrals */ slapi_search_internal_callback_pb (pb, &cb_data /* callback data */, get_result /* result callback */, send_entry /* entry callback */,
389-commits@lists.fedoraproject.org