diff --git a/selftest/knownfail.d/dsdb_schema_attributes b/selftest/knownfail.d/dsdb_schema_attributes deleted file mode 100644 index 4242212707c..00000000000 --- a/selftest/knownfail.d/dsdb_schema_attributes +++ /dev/null @@ -1,2 +0,0 @@ -^samba.tests.dsdb_schema_attributes.samba.tests.dsdb_schema_attributes.SchemaAttributesTestCase.test_modify_at_indexlist -^samba.tests.dsdb_schema_attributes.samba.tests.dsdb_schema_attributes.SchemaAttributesTestCase.test_modify_at_attributes \ No newline at end of file diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index cfd320b2407..8141e323e50 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -175,11 +175,11 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, } if (mod_msg->num_elements > 0) { /* - * Do the replace with the constructed message, - * to avoid needing a lock between this search - * and the replace + * Do the replace with the difference, as we + * are under the read lock and we wish to do a + * delete of any removed/renamed attributes */ - ret = dsdb_replace(ldb, msg, 0); + ret = dsdb_modify(ldb, mod_msg, 0); } talloc_free(mod_msg); } @@ -235,12 +235,13 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, * @SAMBA_FEATURES_SUPPORTED */ } else if (mod_msg->num_elements > 0) { + /* - * Do the replace with the constructed message, - * to avoid needing a lock between this search - * and the replace + * Do the replace with the difference, as we + * are under the read lock and we wish to do a + * delete of any removed/renamed attributes */ - ret = dsdb_replace(ldb, msg_idx, 0); + ret = dsdb_modify(ldb, mod_msg, 0); } talloc_free(mod_msg); }