s4-drs: allow replication of renames
authorAndrew Tridgell <tridge@samba.org>
Mon, 14 Sep 2009 20:12:32 +0000 (13:12 -0700)
committerAndrew Tridgell <tridge@samba.org>
Mon, 14 Sep 2009 20:12:32 +0000 (13:12 -0700)
a rename may have no attribute changes

source4/rpc_server/drsuapi/getncchanges.c

index 2754c8f9b03c88e0c54c5068936ea91678901763..165e485d452ca7f0cb120692ceabb195bdc6b369 100644 (file)
@@ -94,12 +94,13 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
                attids[n] = md.ctr.ctr1.array[i].attid;
                n++;
        }
-       if (n == 0) {
-               /* nothing to send */
-               talloc_free(obj->meta_data_ctr);
-               obj->meta_data_ctr = NULL;
-               return WERR_OK;
-       }
+
+       /*
+         note that if n==0 we still need to send the change, as it
+         could be a rename, which changes the uSNChanged, but not any
+         of the replicated attributes
+        */
+
        obj->meta_data_ctr->count = n;
 
        obj->object.identifier = talloc(obj, struct drsuapi_DsReplicaObjectIdentifier);