s4-dsdb: Modify the repl_meta_data behavior to allow Metadata change on attribute...
authorMatthieu Patou <mat@matws.net>
Fri, 18 Nov 2011 23:37:27 +0000 (00:37 +0100)
committerMatthieu Patou <mat@samba.org>
Sat, 19 Nov 2011 15:47:53 +0000 (16:47 +0100)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat Nov 19 16:47:53 CET 2011 on sn-devel-104

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index b7a6a70b364fb7754d5c3e427e82be9af557e17a..eb5d036e62822aa9f79922321016bcdffbe3167a 100644 (file)
@@ -1092,9 +1092,15 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
                return LDB_SUCCESS;
        }
 
-       /* if the attribute's value haven't changed then return LDB_SUCCESS     */
+       /* if the attribute's value haven't changed then return LDB_SUCCESS
+        * Unless we have the provision control or if the attribute is
+        * interSiteTopologyGenerator as this page explain: http://support.microsoft.com/kb/224815
+        * this attribute is periodicaly written by the DC responsible for the intersite generation
+        * in a given site
+        */
        if (old_el != NULL && ldb_msg_element_compare(el, old_el) == 0) {
-               if (!ldb_request_get_control(req, LDB_CONTROL_PROVISION_OID)) {
+               if (strcmp(el->name, "interSiteTopologyGenerator") != 0 &&
+                   !ldb_request_get_control(req, LDB_CONTROL_PROVISION_OID)) {
                        /*
                         * allow this to make it possible for dbcheck
                         * to rebuild broken metadata