summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-21 22:01:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:05 -0500
commit8485a8d935484cebc7754bbe21ec7ebb9ecd03c3 (patch)
treec5befb125d4d6395669965a7fbe0df374e888fa0
parenta09f8c305256b94b078f7d293fe1fc9b56d28810 (diff)
downloadsamba-8485a8d935484cebc7754bbe21ec7ebb9ecd03c3.tar.gz
samba-8485a8d935484cebc7754bbe21ec7ebb9ecd03c3.tar.bz2
samba-8485a8d935484cebc7754bbe21ec7ebb9ecd03c3.zip
r4911: make sure we fill in the transport called name on port 445 as well
(thanks to abartlet for spotting this bug) (This used to be commit 8b653f12f21e7a8eee8e60cefb193505c2df7f8f)
-rw-r--r--source4/libcli/composite/connect.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/libcli/composite/connect.c b/source4/libcli/composite/connect.c
index 7e08aab0d5..4f6df154a7 100644
--- a/source4/libcli/composite/connect.c
+++ b/source4/libcli/composite/connect.c
@@ -219,19 +219,22 @@ static NTSTATUS connect_socket(struct smbcli_composite *c,
state->transport = smbcli_transport_init(state->sock);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
+ calling.name = io->in.calling_name;
+ calling.type = NBT_NAME_CLIENT;
+ calling.scope = NULL;
+
+ nbt_choose_called_name(state, &called, io->in.called_name, NBT_NAME_SERVER);
+
/* we have a connected socket - next step is a session
request, if needed. Port 445 doesn't need it, so it goes
straight to the negprot */
if (state->sock->port == 445) {
+ status = nbt_name_dup(state->transport, &called,
+ &state->transport->called);
+ NT_STATUS_NOT_OK_RETURN(status);
return connect_send_negprot(c, io);
}
- calling.name = io->in.calling_name;
- calling.type = NBT_NAME_CLIENT;
- calling.scope = NULL;
-
- nbt_choose_called_name(state, &called, io->in.called_name, NBT_NAME_SERVER);
-
state->req = smbcli_transport_connect_send(state->transport, &calling, &called);
NT_STATUS_HAVE_NO_MEMORY(state->req);