s4-dsdb: improve error messages in schema and pdc_fsmo modules
authorAndrew Tridgell <tridge@samba.org>
Wed, 6 Jan 2010 23:09:09 +0000 (10:09 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 02:03:03 +0000 (13:03 +1100)
We want to incorporate the error messages from the modules further
down the stack.

source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
source4/dsdb/samdb/ldb_modules/schema_load.c

index 796ecaf7bca7d90af81074d27b66964fb57c8943..00d9a30fd3d0dab43d4d5bbd3e376e39aec37c6a 100644 (file)
@@ -75,8 +75,8 @@ static int pdc_fsmo_init(struct ldb_module *module)
                return ldb_next_init(module);
        } else if (ret != LDB_SUCCESS) {
                ldb_debug_set(ldb, LDB_DEBUG_FATAL,
-                             "pdc_fsmo_init: failed to search the domain object: %d:%s",
-                             ret, ldb_strerror(ret));
+                             "pdc_fsmo_init: failed to search the domain object: %d:%s: %s",
+                             ret, ldb_strerror(ret), ldb_errstring(ldb));
                talloc_free(mem_ctx);
                return ret;
        }
index c72911fe8973e5096bf4051c0aef07ca68b8672f..6c11df21ce5f9a890e5b40145cdf600a21cb7905 100644 (file)
@@ -181,8 +181,8 @@ static int schema_load_init(struct ldb_module *module)
        ret = dsdb_set_schema(ldb, schema);
        if (ret != LDB_SUCCESS) {
                ldb_debug_set(ldb, LDB_DEBUG_FATAL,
-                             "schema_load_init: dsdb_set_schema() failed: %d:%s",
-                             ret, ldb_strerror(ret));
+                             "schema_load_init: dsdb_set_schema() failed: %d:%s: %s",
+                             ret, ldb_strerror(ret), ldb_errstring(ldb));
                talloc_free(mem_ctx);
                return ret;
        }
@@ -240,8 +240,8 @@ static int schema_load_extended(struct ldb_module *module, struct ldb_request *r
        ret = dsdb_set_schema(ldb, schema);
        if (ret != LDB_SUCCESS) {
                ldb_debug_set(ldb, LDB_DEBUG_FATAL,
-                             "schema_load_extended: dsdb_set_schema() failed: %d:%s",
-                             ret, ldb_strerror(ret));
+                             "schema_load_extended: dsdb_set_schema() failed: %d:%s: %s",
+                             ret, ldb_strerror(ret), ldb_errstring(ldb));
                talloc_free(mem_ctx);
                return ret;
        }