TALLOC_FREE(tmp_ctx);
return WERR_INTERNAL_ERROR;
}
+ } else {
+ /* Force a reload of whatever schema is on the DB, if it is DB based */
+ struct dsdb_schema *refresh_schema = NULL;
+ refresh_schema = dsdb_get_schema(ldb, tmp_ctx);
+ refresh_schema->last_refresh = 0;
+ refresh_schema->metadata_usn = 0;
+ talloc_unlink(tmp_ctx, refresh_schema);
+ refresh_schema = dsdb_get_schema(ldb, tmp_ctx);
+ if (!refresh_schema) {
+ DEBUG(0,("Schema reload failed\n"));
+ return WERR_DS_DRA_INTERNAL_ERROR;
+ }
}
ret = ldb_extended(ldb, DSDB_EXTENDED_REPLICATED_OBJECTS_OID, objects, &ext_res);
return WERR_DS_DRA_INTERNAL_ERROR;
}
+ /* Force a reload */
+ schema->last_refresh = 0;
+ schema->metadata_usn = 0;
+ talloc_unlink(mem_ctx, schema);
+
+ schema = dsdb_get_schema(sam_ctx, mem_ctx);
+ if (!schema) {
+ DEBUG(0,("No schema in sam_ctx\n"));
+ return WERR_DS_DRA_INTERNAL_ERROR;
+ }
+
r->out.ctr->ctr6.naming_context = talloc(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier);
*r->out.ctr->ctr6.naming_context = *ncRoot;