summaryrefslogtreecommitdiff
path: root/source3/rpcclient
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/rpcclient
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/rpcclient')
-rw-r--r--source3/rpcclient/cmd_drsuapi.c11
1 files changed, 8 insertions, 3 deletions
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;
}