summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-11-29 08:45:38 +0100
committerStefan Metzmacher <metze@samba.org>2013-12-23 09:18:15 +0100
commit2fae806550f3355298541a344b217bf810bf92e4 (patch)
treeb0becfc6d45f5f2a34212ed2a47bd024e098828f /source3/rpcclient/rpcclient.c
parent0e46205ff83d137ca486868e4376b258b6dfa1a2 (diff)
downloadsamba-2fae806550f3355298541a344b217bf810bf92e4.tar.gz
s3:rpcclient: close the connection if setting up the netlogon secure channel fails
This is based on a patch from Garming Sam <garming@catalyst.net.nz>. Signed-off-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index c88e6b30d81..eae6bbdb527 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -769,6 +769,10 @@ static NTSTATUS do_cmd(struct cli_state *cli,
trust_password, &machine_account,
&sec_channel_type))
{
+ DEBUG(0, ("Failed to fetch trust password for %s to connect to %s.\n",
+ get_cmdline_auth_info_domain(auth_info),
+ cmd_entry->table->name));
+ TALLOC_FREE(cmd_entry->rpc_pipe);
talloc_free(mem_ctx);
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
}
@@ -785,6 +789,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
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);
talloc_free(mem_ctx);
return ntresult;
}