diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-06 14:33:14 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-09-07 17:09:34 +0300 |
commit | 3f109f8fd7bdd2cc691beb78463fba7a469e2a3d (patch) | |
tree | ee59ce074bce53ed5e64c4e83fc4af4774265f17 /source4/rpc_server | |
parent | 7612760c2226bc43c68f1a7e3b2985d0a22bf277 (diff) | |
download | samba-3f109f8fd7bdd2cc691beb78463fba7a469e2a3d.tar.gz samba-3f109f8fd7bdd2cc691beb78463fba7a469e2a3d.tar.bz2 samba-3f109f8fd7bdd2cc691beb78463fba7a469e2a3d.zip |
s4-drs: Dump exact error when failure occurs during DsReplicaUpdateRefs call
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/drsuapi/updaterefs.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/rpc_server/drsuapi/updaterefs.c b/source4/rpc_server/drsuapi/updaterefs.c index e911838637..8efdfbbdbb 100644 --- a/source4/rpc_server/drsuapi/updaterefs.c +++ b/source4/rpc_server/drsuapi/updaterefs.c @@ -136,15 +136,17 @@ WERROR drsuapi_UpdateRefs(struct drsuapi_bind_state *b_state, TALLOC_CTX *mem_ct } if (ldb_transaction_start(b_state->sam_ctx) != LDB_SUCCESS) { - DEBUG(0,(__location__ ": Failed to start transaction on samdb\n")); + DEBUG(0,(__location__ ": Failed to start transaction on samdb: %s\n", + ldb_errstring(b_state->sam_ctx))); return WERR_DS_DRA_INTERNAL_ERROR; } if (req->options & DRSUAPI_DRS_DEL_REF) { werr = uref_del_dest(b_state->sam_ctx, mem_ctx, dn, &req->dest_dsa_guid, req->options); if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("Failed to delete repsTo for %s\n", - GUID_string(mem_ctx, &req->dest_dsa_guid))); + DEBUG(0,("Failed to delete repsTo for %s: %s\n", + GUID_string(mem_ctx, &req->dest_dsa_guid), + win_errstr(werr))); goto failed; } } @@ -163,14 +165,16 @@ WERROR drsuapi_UpdateRefs(struct drsuapi_bind_state *b_state, TALLOC_CTX *mem_ct werr = uref_add_dest(b_state->sam_ctx, mem_ctx, dn, &dest, req->options); if (!W_ERROR_IS_OK(werr)) { - DEBUG(0,("Failed to add repsTo for %s\n", - GUID_string(mem_ctx, &dest.source_dsa_obj_guid))); + DEBUG(0,("Failed to add repsTo for %s: %s\n", + GUID_string(mem_ctx, &dest.source_dsa_obj_guid), + win_errstr(werr))); goto failed; } } if (ldb_transaction_commit(b_state->sam_ctx) != LDB_SUCCESS) { - DEBUG(0,(__location__ ": Failed to commit transaction on samdb\n")); + DEBUG(0,(__location__ ": Failed to commit transaction on samdb: %s\n", + ldb_errstring(b_state->sam_ctx))); return WERR_DS_DRA_INTERNAL_ERROR; } |