summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-12 13:41:16 +0100
committerGünther Deschner <gd@samba.org>2011-01-12 13:41:16 +0100
commit1cd7f6c0e1c52ad09f3c66d89809bae859285880 (patch)
tree00ad4b2375ae244c5c57a1178c94da272dd31611 /source3
parent415a390ba87f2227eee5312eb3838beb9a7abc30 (diff)
downloadsamba-1cd7f6c0e1c52ad09f3c66d89809bae859285880.tar.gz
samba-1cd7f6c0e1c52ad09f3c66d89809bae859285880.tar.bz2
samba-1cd7f6c0e1c52ad09f3c66d89809bae859285880.zip
s3-drsuapi: fix error handling after converting to dcerpc_drsuapi_X functions.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_dssync.c7
-rw-r--r--source3/rpcclient/cmd_drsuapi.c11
2 files changed, 13 insertions, 5 deletions
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c
index e2391625d8..3aed8b68ed 100644
--- a/source3/libnet/libnet_dssync.c
+++ b/source3/libnet/libnet_dssync.c
@@ -251,11 +251,14 @@ static NTSTATUS libnet_dssync_lookup_nc(TALLOC_CTX *mem_ctx,
if (!NT_STATUS_IS_OK(status)) {
ctx->error_message = talloc_asprintf(ctx,
"Failed to lookup DN for domain name: %s",
- get_friendly_werror_msg(werr));
+ get_friendly_nt_error_msg(status));
return status;
}
if (!W_ERROR_IS_OK(werr)) {
+ ctx->error_message = talloc_asprintf(ctx,
+ "Failed to lookup DN for domain name: %s",
+ get_friendly_werror_msg(werr));
return werror_to_ntstatus(werr);
}
@@ -469,7 +472,7 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx,
if (!NT_STATUS_IS_OK(status)) {
ctx->error_message = talloc_asprintf(ctx,
"Failed to get NC Changes: %s",
- get_friendly_werror_msg(werr));
+ get_friendly_nt_error_msg(status));
goto out;
}
diff --git a/source3/rpcclient/cmd_drsuapi.c b/source3/rpcclient/cmd_drsuapi.c
index b7ea226a95..3f1ecab750 100644
--- a/source3/rpcclient/cmd_drsuapi.c
+++ b/source3/rpcclient/cmd_drsuapi.c
@@ -131,7 +131,8 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
out:
if (is_valid_policy_hnd(&bind_handle)) {
- dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &werr);
+ WERROR _werr;
+ dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &_werr);
}
return werr;
@@ -296,7 +297,8 @@ static WERROR cmd_drsuapi_getdcinfo(struct rpc_pipe_client *cli,
display_domain_controller_info(level_out, &ctr);
out:
if (is_valid_policy_hnd(&bind_handle)) {
- dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &werr);
+ WERROR _werr;
+ dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &_werr);
}
return werr;
@@ -495,12 +497,15 @@ static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
&ctr,
&werr);
if (!NT_STATUS_IS_OK(status)) {
+ werr = ntstatus_to_werror(status);
printf("Failed to get NC Changes: %s",
- get_friendly_werror_msg(werr));
+ get_friendly_nt_error_msg(status));
goto out;
}
if (!W_ERROR_IS_OK(werr)) {
+ printf("Failed to get NC Changes: %s",
+ get_friendly_werror_msg(werr));
goto out;
}