summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-19 13:01:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:18 -0500
commit63bbc2aea6edf51fb4c2dd678b780b2ade9542ce (patch)
tree676c52227e1f28fb1612249d6287f83f5e8b57e8 /source4/wrepl_server
parent6c44ca4eb3f2a188026fb69a009c1fbc9444685d (diff)
downloadsamba-63bbc2aea6edf51fb4c2dd678b780b2ade9542ce.tar.gz
samba-63bbc2aea6edf51fb4c2dd678b780b2ade9542ce.tar.bz2
samba-63bbc2aea6edf51fb4c2dd678b780b2ade9542ce.zip
r13035: active,special group replicas are overwritten by tombstone,special group replicas
metze (This used to be commit cf669e4b2a4dcfb080cbb01a108797acad802f36)
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index 5d7958926c..1da9c03f36 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -265,6 +265,14 @@ SGROUP,ACTIVE vs. SGROUP,ACTIVE A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4 => SGROUP_M
SGROUP,ACTIVE vs. SGROUP,ACTIVE A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4 => SGROUP_MERGE
SGROUP,ACTIVE vs. SGROUP,ACTIVE A:B_3_4_X_3_4 vs. B:B_3_4_X_1_2 => C:B_3_4_X_1_2_3_4 => SGROUP_MERGE
SGROUP,ACTIVE vs. SGROUP,ACTIVE A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4 => SGROUP_MERGE
+
+
+this is a bit strange, incoming tombstone replicas always replace old replicas:
+
+SGROUP,ACTIVE vs. SGROUP,TOMBSTONE A:B_3_4_X_3_4 vs. B:NULL => B:NULL => REPLACE
+SGROUP,ACTIVE vs. SGROUP,TOMBSTONE A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4 => REPLACE
+SGROUP,ACTIVE vs. SGROUP,TOMBSTONE A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4 => REPLACE
+SGROUP,ACTIVE vs. SGROUP,TOMBSTONE A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4 => REPLACE
*/
static enum _R_ACTION replace_sgroup_replica_vs_X_replica(struct winsdb_record *r1, struct wrepl_name *r2)
{
@@ -273,11 +281,21 @@ static enum _R_ACTION replace_sgroup_replica_vs_X_replica(struct winsdb_record *
return R_DO_REPLACE;
}
- if (!R_IS_SGROUP(r2) || !R_IS_ACTIVE(r2)) {
+ if (!R_IS_SGROUP(r2)) {
/* NOT REPLACE */
return R_NOT_REPLACE;
}
+ /*
+ * this is strange, but correct
+ * the incoming tombstone replace the current active
+ * record
+ */
+ if (!R_IS_ACTIVE(r2)) {
+ /* REPLACE */
+ return R_DO_REPLACE;
+ }
+
if (r2->num_addresses == 0) {
if (r_contains_addrs_from_owner(r1, r2->owner)) {
/* not handled here: MERGE */