Revert "s4-drs: cope with bogus empty attributes from w2k8-r2"
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Fri, 18 Dec 2009 01:58:29 +0000 (03:58 +0200)
committerAndrew Tridgell <tridge@samba.org>
Mon, 21 Dec 2009 12:44:19 +0000 (23:44 +1100)
This reverts commit 1287c1d115fb7e8f3954bc05ff65007968403a9c.

Next patch should fix the "not recognized ATTIDs" problem

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/dsdb/repl/replicated_objects.c

index abd3ac85da5e969c728f5263a7b71481b242a45c..c72b107b7502f5a9f594668dd5ab37e38c64034c 100644 (file)
@@ -128,15 +128,6 @@ static WERROR dsdb_convert_object_ex(struct ldb_context *ldb,
                }
 
                status = dsdb_attribute_drsuapi_to_ldb(ldb, schema, a, msg->elements, e);
-               if (!NT_STATUS_IS_OK(status) && a->value_ctr.num_values == 0) {
-                       /* w2k8-r2 occasionally sends bogus empty
-                          attributes with rubbish attribute IDs. The
-                          only think we can do is discard these */
-                       DEBUG(0,(__location__ ": Discarding bogus empty DsReplicaAttribute with attid 0x%x\n",
-                                a->attid));
-                       ZERO_STRUCTP(e);
-                       continue;
-               }
                W_ERROR_NOT_OK_RETURN(status);
 
                m->attid                        = a->attid;
@@ -157,14 +148,6 @@ static WERROR dsdb_convert_object_ex(struct ldb_context *ldb,
                }
        }
 
-       /* delete any empty elements */
-       for (i=0; i < msg->num_elements; i++) {
-               if (msg->elements[i].name == NULL) {
-                       ldb_msg_remove_element(msg, &msg->elements[i]);
-                       i--;
-               }
-       }
-
        if (rdn_m) {
                struct ldb_message_element *el;
                el = ldb_msg_find_element(msg, rdn_attr->lDAPDisplayName);