mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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 8b653f12f2
)
This commit is contained in:
parent
a09f8c3052
commit
8485a8d935
@ -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);
|
||||
|
||||
/* 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) {
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
state->req = smbcli_transport_connect_send(state->transport, &calling, &called);
|
||||
NT_STATUS_HAVE_NO_MEMORY(state->req);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user