diff options
author | Günther Deschner <gd@samba.org> | 2008-06-26 10:22:40 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-26 10:24:14 +0200 |
commit | eb6903344c82c04ff01d55f1dcf289608cb95065 (patch) | |
tree | 212e5232712643d64eec8f49d5c4cfb17c47cbd6 /source3/libnet/libnet_dssync.c | |
parent | 5a4cf3dbf24809a61d4d1d62036e05f5d108d0f6 (diff) | |
download | samba-eb6903344c82c04ff01d55f1dcf289608cb95065.tar.gz |
net_vampire: add some error output to libnet_dssync.
Guenther
(This used to be commit 891d4cca0ca5ccb075940517af25f3760a315219)
Diffstat (limited to 'source3/libnet/libnet_dssync.c')
-rw-r--r-- | source3/libnet/libnet_dssync.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index b1392acd7e2..0866db59bd5 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; } } |