diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-22 14:26:59 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-22 17:10:06 -0700 |
commit | bb3bdb3a62b3b895b9e0c013483a6356ecd7a3aa (patch) | |
tree | dbe0548e6ca98980dea6c1a01e4976b0a8040173 | |
parent | 4a74b2839753aa248f1c60f3e2d1f2441c0ac891 (diff) | |
download | samba-bb3bdb3a62b3b895b9e0c013483a6356ecd7a3aa.tar.gz samba-bb3bdb3a62b3b895b9e0c013483a6356ecd7a3aa.tar.bz2 samba-bb3bdb3a62b3b895b9e0c013483a6356ecd7a3aa.zip |
s4-ldb: added a bunch more debug for DC join
These additional debug messages were added to help us track down
w2k8->s4 domain join
-rw-r--r-- | lib/util/util_ldb.c | 5 | ||||
-rw-r--r-- | source4/dsdb/repl/replicated_objects.c | 4 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 5 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/pdc_fsmo.c | 1 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 3 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_init.c | 4 | ||||
-rw-r--r-- | source4/rpc_server/drsuapi/addentry.c | 6 |
7 files changed, 26 insertions, 2 deletions
diff --git a/lib/util/util_ldb.c b/lib/util/util_ldb.c index 6aea77691b..ac1e11566e 100644 --- a/lib/util/util_ldb.c +++ b/lib/util/util_ldb.c @@ -213,8 +213,9 @@ int gendb_search_single_extended_dn(struct ldb_context *ldb, } if (res->count > 1) { - /* the function is only supposed to return a single - entry */ + /* the function is only supposed to return a single entry */ + DEBUG(0,(__location__ ": More than one return for baseDN %s filter %s\n", + ldb_dn_get_linearized(basedn), filter)); talloc_free(tmp_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c index 5ae622eeaa..5d7ae11a57 100644 --- a/source4/dsdb/repl/replicated_objects.c +++ b/source4/dsdb/repl/replicated_objects.c @@ -441,6 +441,10 @@ WERROR dsdb_origin_objects_commit(struct ldb_context *ldb, for (i=0; i < num_objects; i++) { struct dom_sid *sid = NULL; + + DEBUG(6,(__location__ ": adding %s\n", + ldb_dn_get_linearized(objects[i]->dn))); + ret = ldb_add(ldb, objects[i]); if (ret != 0) { goto cancel; diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index a50e5b4a66..fdb044198b 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -1956,20 +1956,25 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r /* check passwords are single valued here */ /* TODO: remove this when passwords will be single valued in schema */ if (sambaAttr && (sambaAttr->num_values > 1)) { + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } if (clearTextAttr && (clearTextAttr->num_values > 1)) { + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } if (ntAttr && (ntAttr->num_values > 1)) { + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } if (lmAttr && (lmAttr->num_values > 1)) { + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } ac = ph_init_context(module, req); if (!ac) { + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_OPERATIONS_ERROR; } diff --git a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c index fefaef4755..950f87eb74 100644 --- a/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/pdc_fsmo.c @@ -88,6 +88,7 @@ static int pdc_fsmo_init(struct ldb_module *module) ldb_debug_set(ldb, LDB_DEBUG_FATAL, "pdc_fsmo_init: [%u] domain objects found on a base search", pdc_res->count); + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); talloc_free(mem_ctx); return LDB_ERR_CONSTRAINT_VIOLATION; } diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index fa8bd64bf2..39102e5bbe 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -466,6 +466,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req) if (!schema) { ldb_debug_set(ldb, LDB_DEBUG_FATAL, "replmd_add: no dsdb_schema loaded"); + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -866,6 +867,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req) if (!schema) { ldb_debug_set(ldb, LDB_DEBUG_FATAL, "replmd_modify: no dsdb_schema loaded"); + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -1940,6 +1942,7 @@ static int replmd_extended_replicated_objects(struct ldb_module *module, struct if (!ar->schema) { ldb_debug_set(ldb, LDB_DEBUG_FATAL, "replmd_ctx_init: no loaded schema found\n"); talloc_free(ar); + DEBUG(0,(__location__ ": %s\n", ldb_errstring(ldb))); return LDB_ERR_CONSTRAINT_VIOLATION; } diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 8bb54f47f4..b876ab09fc 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -933,6 +933,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, if (!prefix_val) { *error_string = talloc_asprintf(mem_ctx, "schema_fsmo_init: no prefixMap attribute found"); + DEBUG(0,(__location__ ": %s\n", *error_string)); return LDB_ERR_CONSTRAINT_VIOLATION; } info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo"); @@ -950,6 +951,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, *error_string = talloc_asprintf(mem_ctx, "schema_fsmo_init: failed to load oid mappings: %s", win_errstr(status)); + DEBUG(0,(__location__ ": %s\n", *error_string)); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -968,6 +970,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, "schema_fsmo_init: failed to load attribute definition: %s:%s", ldb_dn_get_linearized(attrs_res->msgs[i]->dn), win_errstr(status)); + DEBUG(0,(__location__ ": %s\n", *error_string)); return LDB_ERR_CONSTRAINT_VIOLATION; } @@ -989,6 +992,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, "schema_fsmo_init: failed to load class definition: %s:%s", ldb_dn_get_linearized(objectclass_res->msgs[i]->dn), win_errstr(status)); + DEBUG(0,(__location__ ": %s\n", *error_string)); return LDB_ERR_CONSTRAINT_VIOLATION; } diff --git a/source4/rpc_server/drsuapi/addentry.c b/source4/rpc_server/drsuapi/addentry.c index 74de772f7a..c7c95821ab 100644 --- a/source4/rpc_server/drsuapi/addentry.c +++ b/source4/rpc_server/drsuapi/addentry.c @@ -57,6 +57,9 @@ static WERROR drsuapi_add_SPNs(struct drsuapi_bind_state *b_state, const char *ntds_guid_str; const char *dom_string; + DEBUG(6,(__location__ ": Adding SPNs for %s\n", + ldb_dn_get_linearized(dn))); + ret = ldb_search(b_state->sam_ctx, mem_ctx, &res, dn, LDB_SCOPE_BASE, attrs, "(objectClass=ntDSDSA)"); @@ -72,6 +75,9 @@ static WERROR drsuapi_add_SPNs(struct drsuapi_bind_state *b_state, continue; } + DEBUG(6,(__location__ ": serverReference %s\n", + ldb_dn_get_linearized(ref_dn))); + ntds_guid = samdb_result_guid(res->msgs[0], "objectGUID"); ntds_guid_str = GUID_string(res, &ntds_guid); |