diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 14 | ||||
-rw-r--r-- | source3/libsmb/proto.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 6a7931b786..9742c266b0 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2839,7 +2839,7 @@ fail: return status; } -NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss, +NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss, uint16_t port, int name_type, const char *myname, int signing_state, struct cli_state **pcli) { @@ -2864,8 +2864,8 @@ NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss, } } - status = cli_connect_sock(host, name_type, pss, myname, port, 20, &fd, - &port); + status = cli_connect_sock(host, name_type, dest_ss, myname, port, + 20, &fd, &port); if (!NT_STATUS_IS_OK(status)) { goto fail; } @@ -2875,10 +2875,6 @@ NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss, goto fail; } - if (pss != NULL) { - *pss = cli->dest_ss; - } - *pcli = cli; status = NT_STATUS_OK; fail: @@ -2910,6 +2906,10 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli, return nt_status; } + if (dest_ss != NULL) { + *dest_ss = *cli_state_remote_sockaddr(cli);; + } + if (flags & CLI_FULL_CONNECTION_DONT_SPNEGO) cli->use_spnego = False; else if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 623687cf11..1a57646457 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -76,7 +76,7 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct cli_state *cli); NTSTATUS cli_negprot_recv(struct tevent_req *req); -NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss, +NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss, uint16_t port, int name_type, const char *myname, int signing_state, struct cli_state **pcli); NTSTATUS cli_start_connection(struct cli_state **output_cli, |