瀏覽代碼

Resolves: 207567
Summary: Corrected search scope used to find entries to sync in winsync total update protocol.

Nathan Kinder 18 年之前
父節點
當前提交
6cc7711962

+ 1 - 20
ldap/servers/plugins/replication/windows_protocol_util.c

@@ -3028,23 +3028,11 @@ windows_process_total_add(Private_Repl_Protocol *prp,Slapi_Entry *e, Slapi_DN* r
 	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 @@ int windows_process_total_entry(Private_Repl_Protocol *prp,Slapi_Entry *e)
 				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)
 	{

+ 4 - 4
ldap/servers/plugins/replication/windows_tot_protocol.c

@@ -171,8 +171,10 @@ windows_tot_run(Private_Repl_Protocol *prp)
 	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 @@ windows_tot_run(Private_Repl_Protocol *prp)
 	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 */,