summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 7eb14a2ce1..a600b5fb0c 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -52,6 +52,7 @@
#include "librpc/gen_ndr/ndr_nbt.h"
#include "param/param.h"
#include "librpc/rpc/dcerpc.h"
+#include "libcli/raw/raw_proto.h"
/* the default pager to use for the client "more" command. Users can
* override this with the PAGER environment variable */
@@ -3044,10 +3045,12 @@ static bool do_connect(struct smbclient_context *ctx,
struct resolve_context *resolve_ctx,
const char *specified_server, const char **ports,
const char *specified_share,
+ const char *socket_options,
struct cli_credentials *cred,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
- struct smb_iconv_convenience *iconv_convenience)
+ struct smb_iconv_convenience *iconv_convenience,
+ struct gensec_settings *gensec_settings)
{
NTSTATUS status;
char *server, *share;
@@ -3065,9 +3068,12 @@ static bool do_connect(struct smbclient_context *ctx,
ctx->remote_cur_dir = talloc_strdup(ctx, "\\");
status = smbcli_full_connection(ctx, &ctx->cli, server, ports,
- share, NULL, cred, resolve_ctx,
+ share, NULL,
+ socket_options,
+ cred, resolve_ctx,
ev_ctx, options, session_options,
- iconv_convenience);
+ iconv_convenience,
+ gensec_settings);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to \\\\%s\\%s failed - %s\n",
server, share, nt_errstr(status));
@@ -3101,7 +3107,8 @@ static int do_message_op(const char *netbios_name, const char *desthost,
struct event_context *ev_ctx,
struct resolve_context *resolve_ctx,
struct smbcli_options *options,
- struct smb_iconv_convenience *iconv_convenience)
+ struct smb_iconv_convenience *iconv_convenience,
+ const char *socket_options)
{
struct nbt_name called, calling;
const char *server_name;
@@ -3116,7 +3123,8 @@ static int do_message_op(const char *netbios_name, const char *desthost,
if (!(cli = smbcli_state_init(NULL)) ||
!smbcli_socket_connect(cli, server_name, destports,
ev_ctx, resolve_ctx, options,
- iconv_convenience)) {
+ iconv_convenience,
+ socket_options)) {
d_printf("Connection to %s failed\n", server_name);
return 1;
}
@@ -3269,14 +3277,17 @@ static int do_message_op(const char *netbios_name, const char *desthost,
lp_smb_ports(cmdline_lp_ctx), dest_ip,
name_type, ev_ctx,
lp_resolve_context(cmdline_lp_ctx),
- &smb_options, lp_iconv_convenience(cmdline_lp_ctx));
+ &smb_options, lp_iconv_convenience(cmdline_lp_ctx),
+ lp_socket_options(cmdline_lp_ctx));
return rc;
}
if (!do_connect(ctx, ev_ctx, lp_resolve_context(cmdline_lp_ctx),
desthost, lp_smb_ports(cmdline_lp_ctx), service,
+ lp_socket_options(cmdline_lp_ctx),
cmdline_credentials, &smb_options, &smb_session_options,
- lp_iconv_convenience(cmdline_lp_ctx)))
+ lp_iconv_convenience(cmdline_lp_ctx),
+ lp_gensec_settings(ctx, cmdline_lp_ctx)))
return 1;
if (base_directory)