Signed-off-by: Stefan Metzmacher <metze@samba.org>
static bool backup_intent = false;
static struct sockaddr_storage dest_ss;
static bool backup_intent = false;
static struct sockaddr_storage dest_ss;
-static char dest_ss_str[INET6_ADDRSTRLEN];
#define SEPARATORS " \t\n\r"
#define SEPARATORS " \t\n\r"
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
+ desthost, have_ip ? &dest_ss : NULL,
service, popt_get_cmdline_auth_info(),
smb_encrypt,
max_protocol, port, name_type,
service, popt_get_cmdline_auth_info(),
smb_encrypt,
max_protocol, port, name_type,
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
+ desthost, have_ip ? &dest_ss : NULL,
service, popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol, port,
name_type, &cli);
service, popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol, port,
name_type, &cli);
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : query_host,
+ desthost, have_ip ? &dest_ss : NULL,
"IPC$", popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol, port,
name_type, &cli);
"IPC$", popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol, port,
name_type, &cli);
cli_shutdown(cli);
d_printf("Reconnecting with SMB1 for workgroup listing.\n");
status = cli_cm_open(talloc_tos(), NULL,
cli_shutdown(cli);
d_printf("Reconnecting with SMB1 for workgroup listing.\n");
status = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : query_host,
+ desthost, have_ip ? &dest_ss : NULL,
"IPC$", popt_get_cmdline_auth_info(),
smb_encrypt, max_proto,
NBT_SMB_PORT, name_type, &cli);
"IPC$", popt_get_cmdline_auth_info(),
smb_encrypt, max_proto,
NBT_SMB_PORT, name_type, &cli);
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
NTSTATUS status;
status = cli_cm_open(talloc_tos(), NULL,
- have_ip ? dest_ss_str : desthost,
+ desthost, have_ip ? &dest_ss : NULL,
service, popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol,
port, name_type, &cli);
service, popt_get_cmdline_auth_info(),
smb_encrypt, max_protocol,
port, name_type, &cli);
exit(1);
}
have_ip = true;
exit(1);
}
have_ip = true;
- print_sockaddr(dest_ss_str, sizeof(dest_ss_str), &dest_ss);
}
status = cli_cm_open(ctx, NULL,
}
status = cli_cm_open(ctx, NULL,
+ server_name, NULL, "IPC$",
auth_info,
false,
lp_client_ipc_max_protocol(),
auth_info,
false,
lp_client_ipc_max_protocol(),
NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
struct cli_state *referring_cli,
const char *server,
NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
struct cli_state *referring_cli,
const char *server,
+ const struct sockaddr_storage *dest_ss,
const char *share,
const struct user_auth_info *auth_info,
bool force_encrypt,
const char *share,
const struct user_auth_info *auth_info,
bool force_encrypt,
status = cli_cm_connect(ctx,
referring_cli,
server,
status = cli_cm_connect(ctx,
referring_cli,
server,
share,
auth_info,
force_encrypt,
share,
auth_info,
force_encrypt,
NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
struct cli_state *referring_cli,
const char *server,
NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
struct cli_state *referring_cli,
const char *server,
+ const struct sockaddr_storage *dest_ss,
const char *share,
const struct user_auth_info *auth_info,
bool force_encrypt,
const char *share,
const struct user_auth_info *auth_info,
bool force_encrypt,