summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2013-11-29 14:45:20 +1300
committerStefan Metzmacher <metze@samba.org>2014-01-07 12:47:14 +0100
commita012e2fdd6733e871ddeb68874a2df8413ad91ed (patch)
tree39a717bcafb115693fb51cf4222f7c157033ddaf /source3/rpcclient/rpcclient.c
parent5107ca02a41673739a1fc4a1c2a0fbe8465f211a (diff)
downloadsamba-a012e2fdd6733e871ddeb68874a2df8413ad91ed.tar.gz
s3:rpcclient: give errors and clean up correctly after failing to obtain secret
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpcclient/rpcclient.c')
-rw-r--r--source3/rpcclient/rpcclient.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index fa683b57d27..ed2abc7c4f9 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -786,6 +786,9 @@ static NTSTATUS do_cmd(struct cli_state *cli,
account_name = talloc_asprintf(mem_ctx, "%s$", _account_name);
if (account_name == NULL) {
+ DEBUG(0, ("Out of memory creating account name to connect to %s.\n",
+ cmd_entry->table->name));
+ TALLOC_FREE(cmd_entry->rpc_pipe);
SAFE_FREE(previous_nt_hash);
TALLOC_FREE(mem_ctx);
return NT_STATUS_NO_MEMORY;
@@ -799,6 +802,9 @@ static NTSTATUS do_cmd(struct cli_state *cli,
talloc_autofree_context(),
&rpcclient_netlogon_creds);
if (!NT_STATUS_IS_OK(ntresult)) {
+ DEBUG(0, ("Could not initialise credentials for %s.\n",
+ cmd_entry->table->name));
+ TALLOC_FREE(cmd_entry->rpc_pipe);
SAFE_FREE(previous_nt_hash);
TALLOC_FREE(mem_ctx);
return ntresult;