diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-17 23:56:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:43:42 -0500 |
commit | aa2439da359e966df819f5c142c9b1093420db70 (patch) | |
tree | 1c79df83ebe338d2d22ed0b332e6e7aabc904896 /source4/dsdb | |
parent | 545f97f94e443fa7b05fe9be95efcecec89346c5 (diff) | |
download | samba-aa2439da359e966df819f5c142c9b1093420db70.tar.gz samba-aa2439da359e966df819f5c142c9b1093420db70.tar.bz2 samba-aa2439da359e966df819f5c142c9b1093420db70.zip |
r20866: - fix debug messages missing new lines
- use LDB_DEBUG_WARNING in some places
- debug if we're the schema master
metze
(This used to be commit 63f46344437002202990bd34fb200d847fcfcf40)
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/schema_fsmo.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c index 33a7539b39..c692b983dd 100644 --- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c @@ -60,8 +60,8 @@ static int schema_fsmo_init(struct ldb_module *module) schema_dn = samdb_schema_dn(module->ldb); if (!schema_dn) { - ldb_debug(module->ldb, LDB_DEBUG_TRACE, - "schema_fsmo_init: no schema dn present: (skip schema loading)"); + ldb_debug(module->ldb, LDB_DEBUG_WARNING, + "schema_fsmo_init: no schema dn present: (skip schema loading)\n"); return ldb_next_init(module); } @@ -93,20 +93,20 @@ static int schema_fsmo_init(struct ldb_module *module) &schema_res); if (ret != LDB_SUCCESS) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search the schema head: %d:%s", + "schema_fsmo_init: failed to search the schema head: %d:%s\n", ret, ldb_strerror(ret)); talloc_free(mem_ctx); return ret; } talloc_steal(mem_ctx, schema_res); if (schema_res->count == 0) { - ldb_debug(module->ldb, LDB_DEBUG_TRACE, - "schema_fsmo_init: no schema head present: (skip schema loading)"); + ldb_debug(module->ldb, LDB_DEBUG_WARNING, + "schema_fsmo_init: no schema head present: (skip schema loading)\n"); talloc_free(mem_ctx); return ldb_next_init(module); } else if (schema_res->count > 1) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: [%u] schema heads found on a base search", + "schema_fsmo_init: [%u] schema heads found on a base search\n", schema_res->count); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; @@ -115,14 +115,14 @@ static int schema_fsmo_init(struct ldb_module *module) prefix_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "prefixMap"); if (!prefix_val) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: no prefixMap attribute found"); + "schema_fsmo_init: no prefixMap attribute found\n"); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo"); if (!info_val) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: no schemaInfo attribute found"); + "schema_fsmo_init: no schemaInfo attribute found\n"); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -130,7 +130,7 @@ static int schema_fsmo_init(struct ldb_module *module) status = dsdb_load_oid_mappings_ldb(schema, prefix_val, info_val); if (!W_ERROR_IS_OK(status)) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load oid mappings: %s", + "schema_fsmo_init: failed to load oid mappings: %s\n", win_errstr(status)); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; @@ -145,7 +145,7 @@ static int schema_fsmo_init(struct ldb_module *module) &a_res); if (ret != LDB_SUCCESS) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search attributeSchema objects: %d:%s", + "schema_fsmo_init: failed to search attributeSchema objects: %d:%s\n", ret, ldb_strerror(ret)); talloc_free(mem_ctx); return ret; @@ -164,7 +164,7 @@ static int schema_fsmo_init(struct ldb_module *module) status = dsdb_attribute_from_ldb(schema, a_res->msgs[i], sa, sa); if (!W_ERROR_IS_OK(status)) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load attriute definition: %s:%s", + "schema_fsmo_init: failed to load attriute definition: %s:%s\n", ldb_dn_get_linearized(a_res->msgs[i]->dn), win_errstr(status)); talloc_free(mem_ctx); @@ -184,7 +184,7 @@ static int schema_fsmo_init(struct ldb_module *module) &c_res); if (ret != LDB_SUCCESS) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to search classSchema objects: %d:%s", + "schema_fsmo_init: failed to search classSchema objects: %d:%s\n", ret, ldb_strerror(ret)); talloc_free(mem_ctx); return ret; @@ -203,7 +203,7 @@ static int schema_fsmo_init(struct ldb_module *module) status = dsdb_class_from_ldb(schema, c_res->msgs[i], sc, sc); if (!W_ERROR_IS_OK(status)) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: failed to load class definition: %s:%s", + "schema_fsmo_init: failed to load class definition: %s:%s\n", ldb_dn_get_linearized(c_res->msgs[i]->dn), win_errstr(status)); talloc_free(mem_ctx); @@ -218,7 +218,7 @@ static int schema_fsmo_init(struct ldb_module *module) ret = dsdb_set_schema(module->ldb, schema); if (ret != LDB_SUCCESS) { ldb_debug_set(module->ldb, LDB_DEBUG_FATAL, - "schema_fsmo_init: dsdb_set_schema() failed: %d:%s", + "schema_fsmo_init: dsdb_set_schema() failed: %d:%s\n", ret, ldb_strerror(ret)); talloc_free(mem_ctx); return ret; @@ -231,6 +231,10 @@ static int schema_fsmo_init(struct ldb_module *module) schema_fsmo->we_are_master = false; } + ldb_debug(module->ldb, LDB_DEBUG_TRACE, + "schema_fsmo_init: we are master: %s\n", + (schema_fsmo->we_are_master?"yes":"no")); + talloc_free(mem_ctx); return ldb_next_init(module); } |