s4-dsdb Change debug levels for startup messages session-info
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Sep 2010 05:20:48 +0000 (15:20 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Sep 2010 05:27:34 +0000 (15:27 +1000)
We should make the 'common' error not show up, but the unusal case fatal.

Andrew Bartlett

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

index 3f4c892b5e5143f7f51b0daed8ddd3f8cf730db8..3e45c2e64763087e5192de023da1d19addc94bcf 100644 (file)
@@ -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);
        }
index 9bf49dad9791b074036e33f5ad7bdcf5f69d4fa2..d5ff1dcde55e7caaab29be10e18e24108e6a97c3 100644 (file)
@@ -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) {