s4-repl: don't update replPropertyMetaData for non-replicated attributes
authorAndrew Tridgell <tridge@samba.org>
Fri, 11 Sep 2009 11:45:35 +0000 (21:45 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 11 Sep 2009 11:45:35 +0000 (21:45 +1000)
thanks to Metze for spotting this

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index c4699366455fddd1eed6370b280ab38626c3d11b..bb446333e27177d242cd51987353db1800e20a19 100644 (file)
@@ -491,6 +491,13 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
+       if ((a->systemFlags & 0x00000001) || (a->systemFlags & 0x00000004)) {
+               /* if the attribute is not replicated (0x00000001)
+                * or constructed (0x00000004) it has no metadata
+                */
+               return LDB_SUCCESS;
+       }
+
        for (i=0; i<omd->ctr.ctr1.count; i++) {
                if (a->attributeID_id == omd->ctr.ctr1.array[i].attid) break;
        }