summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/util_ldb.c5
-rw-r--r--source4/dsdb/repl/replicated_objects.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c5
-rw-r--r--source4/dsdb/samdb/ldb_modules/pdc_fsmo.c1
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c3
-rw-r--r--source4/dsdb/schema/schema_init.c4
-rw-r--r--source4/rpc_server/drsuapi/addentry.c6
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);