From eb6903344c82c04ff01d55f1dcf289608cb95065 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 26 Jun 2008 10:22:40 +0200 Subject: net_vampire: add some error output to libnet_dssync. Guenther (This used to be commit 891d4cca0ca5ccb075940517af25f3760a315219) --- source3/libnet/libnet_dssync.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index b1392acd7e..0866db59bd 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -158,6 +158,9 @@ static NTSTATUS libnet_dssync_lookup_nc(TALLOC_CTX *mem_ctx, &ctr, &werr); if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(mem_ctx, + "Failed to lookup DN for domain name: %s", + get_friendly_werror_msg(werr)); return status; } @@ -252,11 +255,14 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, &ctr, &werr); if (!NT_STATUS_IS_OK(status)) { - werr = ntstatus_to_werror(status); + ctx->error_message = talloc_asprintf(mem_ctx, + "Failed to get NC Changes: %s", + get_friendly_werror_msg(werr)); goto out; } if (!W_ERROR_IS_OK(werr)) { + status = werror_to_ntstatus(werr); goto out; } @@ -270,6 +276,9 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, status = cli_get_session_key(mem_ctx, ctx->cli, &ctx->session_key); if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(mem_ctx, + "Failed to get Session Key: %s", + nt_errstr(status)); return status; } @@ -283,6 +292,9 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, ctr1->first_object, ctx); if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(mem_ctx, + "Failed to call processing function: %s", + nt_errstr(status)); goto out; } } @@ -313,6 +325,9 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, ctr6->first_object, ctx); if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(mem_ctx, + "Failed to call processing function: %s", + nt_errstr(status)); goto out; } } -- cgit