Author: abartlet Date: 2007-12-04 05:32:23 +0000 (Tue, 04 Dec 2007) New Revision: 26284
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26284 Log: Rather than just debug, push the error back up the stack as the error string, if we fail to load the schema. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c =================================================================== --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c 2007-12-04 03:38:35 UTC (rev 26283) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c 2007-12-04 05:32:23 UTC (rev 26284) @@ -54,7 +54,7 @@ }; 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 @@ 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 @@ "(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 @@ "(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; }