svn commit: samba r20866 - in
branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
metze at samba.org
metze at samba.org
Wed Jan 17 23:56:02 GMT 2007
Author: metze
Date: 2007-01-17 23:56:01 +0000 (Wed, 17 Jan 2007)
New Revision: 20866
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20866
Log:
- fix debug messages missing new lines
- use LDB_DEBUG_WARNING in some places
- debug if we're the schema master
metze
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-01-17 22:22:29 UTC (rev 20865)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c 2007-01-17 23:56:01 UTC (rev 20866)
@@ -60,8 +60,8 @@
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 @@
&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 @@
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 @@
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 @@
&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 @@
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 @@
&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 @@
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 @@
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 @@
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);
}
More information about the samba-cvs
mailing list