The schema refresh operation itself starts requests from the top of the LDB
modules stack (see call "dsdb_schema_set_attributes" - search operations).
This doesn't work well when these do perform "dsdb_get_schema" calls. Since the
new schema isn't marked as "refreshed" atm (but in fact it still is - we didn't
terminate the reload/refresh yet) we could perform other calls to
"dsdb_schema_refresh" and run into serious trouble (segfault).
goto failed;
}
+ (*schema)->refresh_in_progress = true;
(*schema)->refresh_fn = dsdb_schema_refresh;
(*schema)->loaded_from_module = module;
(*schema)->loaded_usn = current_usn;
/* "dsdb_set_schema()" steals schema into the ldb_context */
ret = dsdb_set_schema(ldb, (*schema));
+ if (*schema != NULL) {
+ (*schema)->refresh_in_progress = false;
+ }
+
if (ret != LDB_SUCCESS) {
ldb_debug_set(ldb, LDB_DEBUG_FATAL,
"schema_load_init: dsdb_set_schema() failed: %d:%s: %s",