mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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
This commit is contained in:
parent
4a74b28397
commit
bb3bdb3a62
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user