struct dsdb_extended_replicated_objects *out;
const struct drsuapi_DsReplicaObjectListItemEx *cur;
uint32_t i;
+ WERROR schema_status;
out = talloc_zero(mem_ctx, struct dsdb_extended_replicated_objects);
W_ERROR_HAVE_NO_MEMORY(out);
return status;
}
+ /*
+ * check for schema changes in case
+ * we are not replicating Schema NC
+ */
+ schema_status = dsdb_schema_info_cmp(schema, mapping_ctr);
+
if (ldb_dn_compare(partition_dn, ldb_get_schema_basedn(ldb)) != 0) {
/*
* check for schema changes in case
* we are not replicating Schema NC
*/
- status = dsdb_schema_info_cmp(schema, mapping_ctr);
- if (!W_ERROR_IS_OK(status)) {
- DEBUG(1,("Remote schema has changed while replicating %s\n",
- partition_dn_str));
+ if (!W_ERROR_IS_OK(schema_status)) {
+ DEBUG(1,("Remote schema has changed while replicating %s - %s\n",
+ partition_dn_str, win_errstr(schema_status)));
talloc_free(out);
- return status;
+ return schema_status;
+ }
+ } else {
+ if (!W_ERROR_IS_OK(schema_status)) {
+ DEBUG(1,("Replicate changed schema from %s - %s\n",
+ partition_dn_str, win_errstr(schema_status)));
}
}
/* free pfm_remote, we won't need it anymore */
talloc_free(pfm_remote);
+ if (!W_ERROR_IS_OK(schema_status)) {
+ DEBUG(1,(__location__ "... Replicate changed schema from %s - %s\n",
+ partition_dn_str, win_errstr(schema_status)));
+ }
+
*objects = out;
return WERR_OK;
}