rpc_server/drsuapi: Block replication of incorrect/duplicate attrid in replPropertMet...
authorAndrew Bartlett <abartlet@samba.org>
Tue, 22 Dec 2015 06:39:31 +0000 (19:39 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 22 Dec 2015 06:48:15 +0000 (19:48 +1300)
If custom schema is used in a replicated DC environment, these are created as soon as
an attribute is modified on more than one DC.  We have to prevent replication as the lookup

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11443
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/rpc_server/drsuapi/getncchanges.c

index d75530637082039d19e52b8611e4c9e9100657df..319ef1548668bc99ddf807e8815f18671e6927d9 100644 (file)
@@ -376,6 +376,16 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
                                return werr;
                        }
                }
+               if (attids[i] != obj->object.attribute_ctr.attributes[i].attid) {
+                       DEBUG(0, ("Unable to replicate attribute %s on %s via DRS, incorrect attributeID:  "
+                                 "0x%08x vs 0x%08x "
+                                 "Run dbcheck!\n",
+                                 sa->lDAPDisplayName,
+                                 ldb_dn_get_linearized(msg->dn),
+                                 attids[i],
+                                 obj->object.attribute_ctr.attributes[i].attid));
+                       return WERR_DS_DATABASE_ERROR;
+               }
        }
 
        return WERR_OK;