diff options
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/schema_load.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c index 9d9c9ebcd7..30aafdb65e 100644 --- a/source4/dsdb/samdb/ldb_modules/schema_load.c +++ b/source4/dsdb/samdb/ldb_modules/schema_load.c @@ -224,6 +224,7 @@ static int dsdb_schema_from_db(struct ldb_module *module, struct ldb_dn *schema_ goto failed; } + (*schema)->refresh_in_progress = true; (*schema)->refresh_fn = dsdb_schema_refresh; (*schema)->loaded_from_module = module; (*schema)->loaded_usn = current_usn; @@ -231,6 +232,10 @@ static int dsdb_schema_from_db(struct ldb_module *module, struct ldb_dn *schema_ /* "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", |