From 19b00d57f4ea0826bce1b615f23f6e182fdd14af Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 4 Dec 2007 05:32:23 +0100 Subject: r26284: Rather than just debug, push the error back up the stack as the error string, if we fail to load the schema. Andrew Bartlett (This used to be commit 1dc771f903dd613a4d6494f7fd45d35c4d282a33) --- source4/dsdb/samdb/ldb_modules/schema_fsmo.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c index b10e3ac203..28853f3e34 100644 --- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c @@ -54,7 +54,7 @@ static int schema_fsmo_init(struct ldb_module *module) }; if (dsdb_get_schema(module->ldb)) { - return ldb_next_init(module); + return ldb_next_init(module); } schema_dn = samdb_schema_dn(module->ldb); @@ -96,9 +96,9 @@ static int schema_fsmo_init(struct ldb_module *module) talloc_free(mem_ctx); return ldb_next_init(module); } else if (ret != LDB_SUCCESS) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search the schema head: %d:%s", - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module->ldb, + "schema_fsmo_init: failed to search the schema head: %s", + ldb_errstring(module->ldb)); talloc_free(mem_ctx); return ret; } @@ -151,9 +151,9 @@ static int schema_fsmo_init(struct ldb_module *module) "(objectClass=attributeSchema)", NULL, &a_res); if (ret != LDB_SUCCESS) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search attributeSchema objects: %d:%s", - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module->ldb, + "schema_fsmo_init: failed to search attributeSchema objects: %s", + ldb_errstring(module->ldb)); talloc_free(mem_ctx); return ret; } @@ -190,9 +190,9 @@ static int schema_fsmo_init(struct ldb_module *module) "(objectClass=classSchema)", NULL, &c_res); if (ret != LDB_SUCCESS) { - ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search classSchema objects: %d:%s", - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module->ldb, + "schema_fsmo_init: failed to search classSchema objects: %s", + ldb_errstring(module->ldb)); talloc_free(mem_ctx); return ret; } -- cgit