summaryrefslogtreecommitdiff
path: root/source4/libcli/smb_composite
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/libcli/smb_composite
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/libcli/smb_composite')
-rw-r--r--source4/libcli/smb_composite/connect.c12
-rw-r--r--source4/libcli/smb_composite/fetchfile.c5
-rw-r--r--source4/libcli/smb_composite/fsinfo.c4
-rw-r--r--source4/libcli/smb_composite/smb_composite.h1
4 files changed, 16 insertions, 6 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index fafd3b0173..b71cfc2c19 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -309,7 +309,8 @@ static NTSTATUS connect_socket(struct composite_context *c,
/* the socket is up - we can initialise the smbcli transport layer */
state->transport = smbcli_transport_init(state->sock, state, true,
lp_max_xmit(global_loadparm),
- lp_maxmux(global_loadparm));
+ lp_maxmux(global_loadparm),
+ lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm));
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
@@ -362,7 +363,8 @@ static NTSTATUS connect_resolve(struct composite_context *c,
state->creq = smbcli_sock_connect_send(state, address,
io->in.dest_ports,
- io->in.dest_host, c->event_ctx);
+ io->in.dest_host,
+ NULL, c->event_ctx);
NT_STATUS_HAVE_NO_MEMORY(state->creq);
state->stage = CONNECT_SOCKET;
@@ -440,6 +442,7 @@ static void composite_handler(struct composite_context *creq)
*/
struct composite_context *smb_composite_connect_send(struct smb_composite_connect *io,
TALLOC_CTX *mem_ctx,
+ struct resolve_context *resolve_ctx,
struct event_context *event_ctx)
{
struct composite_context *c;
@@ -464,7 +467,7 @@ struct composite_context *smb_composite_connect_send(struct smb_composite_connec
state->stage = CONNECT_RESOLVE;
make_nbt_name_server(&name, io->in.dest_host);
- state->creq = resolve_name_send(lp_resolve_context(global_loadparm), &name, c->event_ctx);
+ state->creq = resolve_name_send(resolve_ctx, &name, c->event_ctx);
if (state->creq == NULL) goto failed;
state->creq->async.private_data = c;
@@ -498,8 +501,9 @@ NTSTATUS smb_composite_connect_recv(struct composite_context *c, TALLOC_CTX *mem
sync version of smb_composite_connect
*/
NTSTATUS smb_composite_connect(struct smb_composite_connect *io, TALLOC_CTX *mem_ctx,
+ struct resolve_context *resolve_ctx,
struct event_context *ev)
{
- struct composite_context *c = smb_composite_connect_send(io, mem_ctx, ev);
+ struct composite_context *c = smb_composite_connect_send(io, mem_ctx, resolve_ctx, ev);
return smb_composite_connect_recv(c, mem_ctx);
}
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index a4f73ffd70..f3934a2123 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -23,6 +23,8 @@
#include "includes.h"
#include "libcli/composite/composite.h"
#include "libcli/smb_composite/smb_composite.h"
+#include "param/param.h"
+#include "libcli/resolve/resolve.h"
enum fetchfile_stage {FETCHFILE_CONNECT,
FETCHFILE_READ};
@@ -145,7 +147,8 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.fallback_to_anonymous = false;
state->connect->in.workgroup = io->in.workgroup;
- state->creq = smb_composite_connect_send(state->connect, state, event_ctx);
+ state->creq = smb_composite_connect_send(state->connect, state,
+ lp_resolve_context(global_loadparm), event_ctx);
if (state->creq == NULL) goto failed;
state->creq->async.private_data = c;
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index f37213e2f9..2d8240572e 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -6,6 +6,8 @@
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
#include "libcli/smb_composite/smb_composite.h"
+#include "param/param.h"
+#include "libcli/resolve/resolve.h"
/* the stages of this call */
enum fsinfo_stage {FSINFO_CONNECT, FSINFO_QUERY};
@@ -157,7 +159,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
c->private_data = state;
state->creq = smb_composite_connect_send(state->connect, state,
- c->event_ctx);
+ lp_resolve_context(global_loadparm), c->event_ctx);
if (state->creq == NULL) goto failed;
diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h
index a3188c4fe2..5574495079 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -171,5 +171,6 @@ struct smb_composite_connectmulti {
};
struct smbcli_session;
+struct resolve_context;
#include "libcli/smb_composite/proto.h"