mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3:libsmb: only pass a const sockaddr_storage to cli_start_connection()
Let the caller use cli_state_remote_sockaddr() if needed. metze
This commit is contained in:
parent
6cc61d6341
commit
1eb8c2ae22
@ -2892,7 +2892,7 @@ fail:
|
||||
NTSTATUS cli_start_connection(struct cli_state **output_cli,
|
||||
const char *my_name,
|
||||
const char *dest_host,
|
||||
struct sockaddr_storage *dest_ss, int port,
|
||||
const struct sockaddr_storage *dest_ss, int port,
|
||||
int signing_state, int flags)
|
||||
{
|
||||
NTSTATUS nt_status;
|
||||
@ -2906,10 +2906,6 @@ 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)
|
||||
@ -2975,6 +2971,10 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
if (dest_ss != NULL) {
|
||||
*dest_ss = *cli_state_remote_sockaddr(cli);;
|
||||
}
|
||||
|
||||
cli->use_oplocks = ((flags & CLI_FULL_CONNECTION_OPLOCKS) != 0);
|
||||
cli->use_level_II_oplocks =
|
||||
((flags & CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS) != 0);
|
||||
|
@ -82,7 +82,7 @@ NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss
|
||||
NTSTATUS cli_start_connection(struct cli_state **output_cli,
|
||||
const char *my_name,
|
||||
const char *dest_host,
|
||||
struct sockaddr_storage *dest_ss, int port,
|
||||
const struct sockaddr_storage *dest_ss, int port,
|
||||
int signing_state, int flags);
|
||||
NTSTATUS cli_full_connection(struct cli_state **output_cli,
|
||||
const char *my_name,
|
||||
|
Loading…
Reference in New Issue
Block a user