r11189: add some more special group vs. special group tests,
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Oct 2005 17:48:55 +0000 (17:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:44:58 +0000 (13:44 -0500)
to make sure that replicas from the same owner are blinding overwritten
in all cases

metze

source/torture/nbt/winsreplication.c
source/wrepl_server/wrepl_apply_records.c

index 257a786f2a19f08bf6031378c0761213d4edb65e..d3bd609096c37a33381bc8d603dd6d57d8ce5c9f 100644 (file)
@@ -676,6 +676,20 @@ static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
                .num_ips        = ARRAY_SIZE(addresses_A_1),
                .ips            = addresses_A_1,
                },{
+               .type           = WREPL_TYPE_SGROUP,
+               .state          = WREPL_STATE_ACTIVE,
+               .node           = WREPL_NODE_B,
+               .is_static      = False,
+               .num_ips        = ARRAY_SIZE(addresses_A_3_4),
+               .ips            = addresses_A_3_4,
+               },{
+               .type           = WREPL_TYPE_SGROUP,
+               .state          = WREPL_STATE_TOMBSTONE,
+               .node           = WREPL_NODE_B,
+               .is_static      = False,
+               .num_ips        = ARRAY_SIZE(addresses_B_3_4),
+               .ips            = addresses_B_3_4,
+               },{
                /* the last one should always be a unique,tomstone record! */
                .type           = WREPL_TYPE_UNIQUE,
                .state          = WREPL_STATE_TOMBSTONE,
index 55b8a6e387239587e50bfea1ada2dfb4bcfb9c13..e86750b3faacd8d795c6cb196a2fae03de988344 100644 (file)
@@ -63,10 +63,9 @@ static const char *_R_ACTION_enum_string(enum _R_ACTION action)
 #define R_IS_SGROUP(r) ((r)->type == WREPL_TYPE_SGROUP)
 #define R_IS_MHOMED(r) ((r)->type == WREPL_TYPE_MHOMED)
 
+/* blindly overwrite records from the same owner in all cases */
 static enum _R_ACTION replace_same_owner(struct winsdb_record *r1, struct wrepl_name *r2)
 {
-       /* TODO: we need to look closer at how special groups are handled */
-
        /* REPLACE */
        return R_DO_REPLACE;
 }