From b2ea0ca3d6280902135942f61cd3f28daecf77c1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Sep 2010 15:20:48 +1000 Subject: [PATCH] s4-dsdb Change debug levels for startup messages We should make the 'common' error not show up, but the unusal case fatal. Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/naming_fsmo.c | 10 +++++----- source4/dsdb/samdb/ldb_modules/pdc_fsmo.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c index 3f4c892b5e5..3e45c2e6476 100644 --- a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c @@ -52,10 +52,10 @@ static int naming_fsmo_init(struct ldb_module *module) naming_dn = samdb_partitions_dn(ldb, mem_ctx); if (!naming_dn) { - ldb_debug(ldb, LDB_DEBUG_WARNING, - "naming_fsmo_init: no partitions dn present: (skip loading of naming contexts details)\n"); + ldb_debug_set(ldb, LDB_DEBUG_FATAL, + "naming_fsmo_init: unable to determine partitions dn"); talloc_free(mem_ctx); - return ldb_next_init(module); + return LDB_ERR_OPERATIONS_ERROR; } naming_fsmo = talloc_zero(mem_ctx, struct dsdb_naming_fsmo); @@ -69,8 +69,8 @@ static int naming_fsmo_init(struct ldb_module *module) naming_attrs, DSDB_FLAG_NEXT_MODULE); if (ret == LDB_ERR_NO_SUCH_OBJECT) { - ldb_debug(ldb, LDB_DEBUG_WARNING, - "naming_fsmo_init: no partitions dn present: (skip loading of naming contexts details)\n"); + ldb_debug(ldb, LDB_DEBUG_TRACE, + "naming_fsmo_init: no partitions dn present: (skip loading of naming contexts details)"); talloc_free(mem_ctx); return ldb_next_init(module); } diff --git a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c index 9bf49dad979..d5ff1dcde55 100644 --- a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c @@ -51,10 +51,10 @@ static int pdc_fsmo_init(struct ldb_module *module) pdc_dn = ldb_get_default_basedn(ldb); if (!pdc_dn) { - ldb_debug(ldb, LDB_DEBUG_WARNING, - "pdc_fsmo_init: no domain dn present: (skip loading of domain details)\n"); + ldb_debug_set(ldb, LDB_DEBUG_FATAL, + "pdc_fsmo_init: could not determine default basedn"); talloc_free(mem_ctx); - return ldb_next_init(module); + return LDB_ERR_OPERATIONS_ERROR; } pdc_fsmo = talloc_zero(mem_ctx, struct dsdb_pdc_fsmo); @@ -68,8 +68,8 @@ static int pdc_fsmo_init(struct ldb_module *module) pdc_attrs, DSDB_FLAG_NEXT_MODULE); if (ret == LDB_ERR_NO_SUCH_OBJECT) { - ldb_debug(ldb, LDB_DEBUG_WARNING, - "pdc_fsmo_init: no domain object present: (skip loading of domain details)\n"); + ldb_debug(ldb, LDB_DEBUG_TRACE, + "pdc_fsmo_init: no domain object present: (skip loading of domain details)"); talloc_free(mem_ctx); return ldb_next_init(module); } else if (ret != LDB_SUCCESS) { -- 2.34.1