summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-02 18:39:01 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-02 12:48:03 -0600
commit771b347f9b185895390445be96081c781e28a26d (patch)
tree8cbd2b1276c18583af2ade0bc67cc181a11490ad /source4/client/client.c
parent37b822e49f3f7a29950ff6f52cfebf72dd583db9 (diff)
downloadsamba-771b347f9b185895390445be96081c781e28a26d.tar.gz
samba-771b347f9b185895390445be96081c781e28a26d.tar.bz2
samba-771b347f9b185895390445be96081c781e28a26d.zip
r26644: Janitorial: Pass resolve_context explicitly to various SMB functions, should help fix the build for OpenChange.
(This used to be commit 385ffe4f4cc9a21a760c0f00410f56e2592fd507)
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 2f6a7abcc0..7ce3268d3a 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -3019,7 +3019,8 @@ static int process_stdin(struct smbclient_context *ctx)
/*****************************************************
return a connection to a server
*******************************************************/
-static bool do_connect(struct smbclient_context *ctx,
+static bool do_connect(struct smbclient_context *ctx,
+ struct resolve_context *resolve_ctx,
const char *specified_server, const char **ports, const char *specified_share, struct cli_credentials *cred)
{
NTSTATUS status;
@@ -3038,7 +3039,7 @@ 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,
+ share, NULL, cred, resolve_ctx,
cli_credentials_get_event_context(cred));
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to \\\\%s\\%s failed - %s\n",
@@ -3064,7 +3065,7 @@ static int do_host_query(struct loadparm_context *lp_ctx, const char *query_host
/****************************************************************************
handle a message operation
****************************************************************************/
-static int do_message_op(const char *netbios_name, const char *desthost, const char **destports, const char *destip, int name_type, struct resolve_context *resolve_ctx, int max_xmit, int max_mux)
+static int do_message_op(const char *netbios_name, const char *desthost, const char **destports, const char *destip, int name_type, struct resolve_context *resolve_ctx, int max_xmit, int max_mux, bool use_spnego)
{
struct nbt_name called, calling;
const char *server_name;
@@ -3076,7 +3077,7 @@ static int do_message_op(const char *netbios_name, const char *desthost, const c
server_name = destip ? destip : desthost;
- if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, destports, resolve_ctx, max_xmit, max_mux)) {
+ if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, destports, resolve_ctx, max_xmit, max_mux, use_spnego)) {
d_printf("Connection to %s failed\n", server_name);
return 1;
}
@@ -3224,10 +3225,10 @@ static int do_message_op(const char *netbios_name, const char *desthost, const c
}
if (message) {
- return do_message_op(lp_netbios_name(cmdline_lp_ctx), desthost, lp_smb_ports(cmdline_lp_ctx), dest_ip, name_type, lp_resolve_context(cmdline_lp_ctx), lp_max_xmit(cmdline_lp_ctx), lp_maxmux(cmdline_lp_ctx));
+ return do_message_op(lp_netbios_name(cmdline_lp_ctx), desthost, lp_smb_ports(cmdline_lp_ctx), dest_ip, name_type, lp_resolve_context(cmdline_lp_ctx), lp_max_xmit(cmdline_lp_ctx), lp_maxmux(cmdline_lp_ctx), lp_nt_status_support(cmdline_lp_ctx) && lp_use_spnego(cmdline_lp_ctx));
}
- if (!do_connect(ctx, desthost, lp_smb_ports(cmdline_lp_ctx), service, cmdline_credentials))
+ if (!do_connect(ctx, lp_resolve_context(cmdline_lp_ctx), desthost, lp_smb_ports(cmdline_lp_ctx), service, cmdline_credentials))
return 1;
if (base_directory)