From ab4d635b92b116b02b88843b4ec4f5b7517bab1a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Sep 2005 11:47:55 +0000 Subject: r10504: - seperate implementation specific stuff, from the generic composite stuff. - don't use SMBCLI_REQUEST_* state's in the genreic composite stuff - move monitor_fn to libnet. NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR state in the _send() function. I haven't fixed this bugs in this commit! We may need some composite_trigger_*() functions or so. And maybe some other generic helper functions... metze (This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc) --- source4/libcli/smb_composite/fetchfile.c | 187 +++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 source4/libcli/smb_composite/fetchfile.c (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c new file mode 100644 index 0000000000..9e88fb669d --- /dev/null +++ b/source4/libcli/smb_composite/fetchfile.c @@ -0,0 +1,187 @@ +/* + Unix SMB/CIFS implementation. + + Copyright (C) Volker Lendecke 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +/* + a composite API for loading a whole file into memory +*/ + +#include "includes.h" +#include "libcli/raw/libcliraw.h" +#include "libcli/composite/composite.h" +#include "libcli/smb_composite/smb_composite.h" + +enum fetchfile_stage {FETCHFILE_CONNECT, + FETCHFILE_READ}; + +struct fetchfile_state { + enum fetchfile_stage stage; + struct smb_composite_fetchfile *io; + struct composite_context *creq; + struct smb_composite_connect *connect; + struct smb_composite_loadfile *loadfile; +}; + +static void fetchfile_composite_handler(struct composite_context *req); + +static NTSTATUS fetchfile_connect(struct composite_context *c, + struct smb_composite_fetchfile *io) +{ + NTSTATUS status; + struct fetchfile_state *state; + state = talloc_get_type(c->private_data, struct fetchfile_state); + + status = smb_composite_connect_recv(state->creq, c); + NT_STATUS_NOT_OK_RETURN(status); + + state->loadfile = talloc(state, struct smb_composite_loadfile); + NT_STATUS_HAVE_NO_MEMORY(state->loadfile); + + state->loadfile->in.fname = io->in.filename; + + state->creq = smb_composite_loadfile_send(state->connect->out.tree, + state->loadfile); + NT_STATUS_HAVE_NO_MEMORY(state->creq); + + state->creq->async.private_data = c; + state->creq->async.fn = fetchfile_composite_handler; + + state->stage = FETCHFILE_READ; + c->event_ctx = talloc_reference(c, state->creq->event_ctx); + + return NT_STATUS_OK; +} + +static NTSTATUS fetchfile_read(struct composite_context *c, + struct smb_composite_fetchfile *io) +{ + NTSTATUS status; + struct fetchfile_state *state; + state = talloc_get_type(c->private_data, struct fetchfile_state); + + status = smb_composite_loadfile_recv(state->creq, NULL); + NT_STATUS_NOT_OK_RETURN(status); + + io->out.data = state->loadfile->out.data; + io->out.size = state->loadfile->out.size; + + c->state = COMPOSITE_STATE_DONE; + if (c->async.fn) + c->async.fn(c); + + return NT_STATUS_OK; +} + +static void fetchfile_state_handler(struct composite_context *c) +{ + struct fetchfile_state *state; + NTSTATUS status; + + state = talloc_get_type(c->private_data, struct fetchfile_state); + + /* when this handler is called, the stage indicates what + call has just finished */ + switch (state->stage) { + case FETCHFILE_CONNECT: + status = fetchfile_connect(c, state->io); + break; + case FETCHFILE_READ: + status = fetchfile_read(c, state->io); + break; + } + + if (!NT_STATUS_IS_OK(status)) { + c->status = status; + c->state = COMPOSITE_STATE_ERROR; + if (c->async.fn) { + c->async.fn(c); + } + } +} + +static void fetchfile_composite_handler(struct composite_context *creq) +{ + struct composite_context *c = talloc_get_type(creq->async.private_data, + struct composite_context); + fetchfile_state_handler(c); +} + +struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetchfile *io, + struct event_context *event_ctx) +{ + struct composite_context *c; + struct fetchfile_state *state; + + c = talloc_zero(NULL, struct composite_context); + if (c == NULL) goto failed; + + state = talloc(c, struct fetchfile_state); + if (state == NULL) goto failed; + + state->connect = talloc(state, struct smb_composite_connect); + if (state->connect == NULL) goto failed; + + state->io = io; + + state->connect->in.dest_host = io->in.dest_host; + state->connect->in.port = io->in.port; + state->connect->in.called_name = io->in.called_name; + state->connect->in.service = io->in.service; + state->connect->in.service_type = io->in.service_type; + state->connect->in.credentials = io->in.credentials; + state->connect->in.workgroup = io->in.workgroup; + + state->creq = smb_composite_connect_send(state->connect, event_ctx); + if (state->creq == NULL) goto failed; + + state->creq->async.private_data = c; + state->creq->async.fn = fetchfile_composite_handler; + + c->state = COMPOSITE_STATE_IN_PROGRESS; + state->stage = FETCHFILE_CONNECT; + c->event_ctx = talloc_reference(c, state->creq->event_ctx); + c->private_data = state; + + return c; + failed: + talloc_free(c); + return NULL; +} + +NTSTATUS smb_composite_fetchfile_recv(struct composite_context *c, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + + status = composite_wait(c); + + if (NT_STATUS_IS_OK(status)) { + struct fetchfile_state *state = talloc_get_type(c->private_data, struct fetchfile_state); + talloc_steal(mem_ctx, state->io->out.data); + } + + talloc_free(c); + return status; +} + +NTSTATUS smb_composite_fetchfile(struct smb_composite_fetchfile *io, + TALLOC_CTX *mem_ctx) +{ + struct composite_context *c = smb_composite_fetchfile_send(io, NULL); + return smb_composite_fetchfile_recv(c, mem_ctx); +} -- cgit From 68c70ef396f84077dd08f97bf700f0c2963c8676 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 2 Oct 2005 10:02:35 +0000 Subject: r10677: Add smb_composite_connectmulti: Send out multiple SYN packets at once, use the first one that replies correctly. Add a talloc context to smb_composite_connect() Volker (This used to be commit 6b88de182e40cb00a833c085f801fd47c92bbe94) --- source4/libcli/smb_composite/fetchfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 9e88fb669d..8aa91bf3a9 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -146,7 +146,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->connect->in.credentials = io->in.credentials; state->connect->in.workgroup = io->in.workgroup; - state->creq = smb_composite_connect_send(state->connect, event_ctx); + state->creq = smb_composite_connect_send(state->connect, state, event_ctx); if (state->creq == NULL) goto failed; state->creq->async.private_data = c; -- cgit From d617556ef50863d6a03c81a04f0f6b05848a250e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 10 Oct 2005 19:57:55 +0000 Subject: r10878: Reply to some comments by tridge and metze: * rename the composite helper functions from comp_* to composite_* * Move the lsa initialization to wb_connect_lsa.c * Equip smb_composite_connect with a fallback_to_anonymous The latter two simplify wb_init_domain.c quite a bit. Volker (This used to be commit deb127e04ea01ae93394da5ebffb39d81caeb6d9) --- source4/libcli/smb_composite/fetchfile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 8aa91bf3a9..1891ee956c 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -144,6 +144,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->connect->in.service = io->in.service; state->connect->in.service_type = io->in.service_type; state->connect->in.credentials = io->in.credentials; + 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); -- cgit From 8f91998e0437b3481c095c7fcb6fca79d8b405df Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 31 Oct 2005 21:37:36 +0000 Subject: r11424: Fix an uninitialized variable warning (This used to be commit fed26bc4fdb47b5bd1aaa6374b09252c239bbac4) --- source4/libcli/smb_composite/fetchfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 1891ee956c..a885aaa911 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -90,7 +90,7 @@ static NTSTATUS fetchfile_read(struct composite_context *c, static void fetchfile_state_handler(struct composite_context *c) { struct fetchfile_state *state; - NTSTATUS status; + NTSTATUS status = NT_STATUS_UNSUCCESSFUL; state = talloc_get_type(c->private_data, struct fetchfile_state); -- cgit From d4de4c2d210d2e8c9b5aedf70695594809ad6a0b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Dec 2005 13:16:54 +0000 Subject: r12608: Remove some unused #include lines. (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981) --- source4/libcli/smb_composite/fetchfile.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index a885aaa911..5783a3258f 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "libcli/raw/libcliraw.h" #include "libcli/composite/composite.h" #include "libcli/smb_composite/smb_composite.h" -- cgit From 32b0bb64bcb91a3f08fcaea72b89bf6409d0e67c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 11 Mar 2006 10:25:59 +0000 Subject: r14205: move smb specific stuff out of includes.h (finally!!!:-) all this changes really help ccache to speed up the samba4 build:-) metze (This used to be commit 180a79d1036e54fc0c50572b820818e9aafa28e9) --- source4/libcli/smb_composite/fetchfile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 5783a3258f..6ad70a3af7 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "smb.h" #include "libcli/composite/composite.h" #include "libcli/smb_composite/smb_composite.h" -- cgit From 0329d755a7611ba3897fc1ee9bdce410cc33d7f8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 30 Aug 2006 11:29:34 +0000 Subject: r17930: Merge noinclude branch: * Move dlinklist.h, smb.h to subsystem-specific directories * Clean up ads.h and move what is left of it to dsdb/ (only place where it's used) (This used to be commit f7afa1cb77f3cfa7020b57de12e6003db7cfcc42) --- source4/libcli/smb_composite/fetchfile.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 6ad70a3af7..5783a3258f 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "smb.h" #include "libcli/composite/composite.h" #include "libcli/smb_composite/smb_composite.h" -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/smb_composite/fetchfile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 5783a3258f..63a10a667d 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* a composite API for loading a whole file into memory -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/libcli/smb_composite/fetchfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 63a10a667d..2dbaff5a66 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -142,7 +142,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->connect->in.service = io->in.service; state->connect->in.service_type = io->in.service_type; state->connect->in.credentials = io->in.credentials; - state->connect->in.fallback_to_anonymous = False; + 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); -- cgit From 4b0199a5493ea2b88558cc40871e63c1dc8dbb56 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 12 Dec 2007 02:15:29 +0100 Subject: r26409: Pass smb ports along. (This used to be commit 2833f320de1f1fd39c710ad0a61c3fa1bb1df31f) --- source4/libcli/smb_composite/fetchfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 2dbaff5a66..a4f73ffd70 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -137,7 +137,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->io = io; state->connect->in.dest_host = io->in.dest_host; - state->connect->in.port = io->in.port; + state->connect->in.dest_ports = io->in.ports; state->connect->in.called_name = io->in.called_name; state->connect->in.service = io->in.service; state->connect->in.service_type = io->in.service_type; -- cgit From 771b347f9b185895390445be96081c781e28a26d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Jan 2008 18:39:01 -0600 Subject: r26644: Janitorial: Pass resolve_context explicitly to various SMB functions, should help fix the build for OpenChange. (This used to be commit 385ffe4f4cc9a21a760c0f00410f56e2592fd507) --- source4/libcli/smb_composite/fetchfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') 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; -- cgit From 969b8579c755441092e27b499ecedbd7d725816d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Jan 2008 18:39:15 -0600 Subject: r26646: libcli/smb_composite: Allow specifying SMB parameters in smb_composite_connect structure. AFAIK no global variables will now be used when doing RPC client connections. (This used to be commit 0ef75e4e3cb0e1bd10e367a00f5e9b725587c40a) --- source4/libcli/smb_composite/fetchfile.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index f3934a2123..893eb854f5 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -147,6 +147,14 @@ 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->connect->in.max_xmit = lp_max_xmit(global_loadparm); + state->connect->in.max_mux = lp_maxmux(global_loadparm); + state->connect->in.ntstatus_support = lp_nt_status_support(global_loadparm); + state->connect->in.max_protocol = lp_cli_maxprotocol(global_loadparm); + state->connect->in.unicode = lp_unicode(global_loadparm); + state->connect->in.use_spnego = lp_use_spnego(global_loadparm) && + lp_nt_status_support(global_loadparm); + state->creq = smb_composite_connect_send(state->connect, state, lp_resolve_context(global_loadparm), event_ctx); if (state->creq == NULL) goto failed; -- cgit From 425732f688865ebe2bfe568c8278edec50cbdedf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:21:58 -0600 Subject: r26651: libsmb: Allow specifying signing policy from higher up. The number of arguments is getting a bit excessive now, so it probably makes sense to pass in the smbcli_options struct rather than all members individually and add a convenience function for obtaining a smbcli_options struct from a loadparm context. (This used to be commit 9f64213463b5bf3bcbf36913139e9a5042e967a2) --- source4/libcli/smb_composite/fetchfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 893eb854f5..5fa48b4863 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -154,7 +154,8 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->connect->in.unicode = lp_unicode(global_loadparm); state->connect->in.use_spnego = lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm); - + state->connect->in.signing = lp_client_signing(global_loadparm); + state->creq = smb_composite_connect_send(state->connect, state, lp_resolve_context(global_loadparm), event_ctx); if (state->creq == NULL) goto failed; -- cgit From dcc282590b34537fc1ead61c3300172528273b44 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:22:12 -0600 Subject: r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct. (This used to be commit 8a97886e24a4b969aa91409c06f423b71a45f6eb) --- source4/libcli/smb_composite/fetchfile.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 5fa48b4863..c7d02e323c 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -147,14 +147,7 @@ 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->connect->in.max_xmit = lp_max_xmit(global_loadparm); - state->connect->in.max_mux = lp_maxmux(global_loadparm); - state->connect->in.ntstatus_support = lp_nt_status_support(global_loadparm); - state->connect->in.max_protocol = lp_cli_maxprotocol(global_loadparm); - state->connect->in.unicode = lp_unicode(global_loadparm); - state->connect->in.use_spnego = lp_use_spnego(global_loadparm) && - lp_nt_status_support(global_loadparm); - state->connect->in.signing = lp_client_signing(global_loadparm); + lp_smbcli_options(global_loadparm, &state->connect->in.options); state->creq = smb_composite_connect_send(state->connect, state, lp_resolve_context(global_loadparm), event_ctx); -- cgit From 921b17648456027b6b46a582aa1d13024a5e9a90 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 14:50:57 +0100 Subject: Remove more uses of global_loadparm. (This used to be commit 47d05ecf6fef66c90994f666b8c63e2e7b5a6cd8) --- source4/libcli/smb_composite/fetchfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index c7d02e323c..e4312794c9 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -147,8 +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; - lp_smbcli_options(global_loadparm, &state->connect->in.options); - + state->connect->in.options = io->in.options; + state->creq = smb_composite_connect_send(state->connect, state, lp_resolve_context(global_loadparm), event_ctx); if (state->creq == NULL) goto failed; -- cgit From 2946a11dc7d367128d8c002966ac19e3e36450dd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 28 Feb 2008 20:30:03 +0100 Subject: Remove use of global_loadparm. (This used to be commit 4472d7e1e47d4fe6b1c60e28d168cce99b237979) --- source4/libcli/smb_composite/fetchfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index e4312794c9..d8d7481270 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -150,7 +150,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->connect->in.options = io->in.options; state->creq = smb_composite_connect_send(state->connect, state, - lp_resolve_context(global_loadparm), event_ctx); + io->in.resolve_ctx, event_ctx); if (state->creq == NULL) goto failed; state->creq->async.private_data = c; -- cgit From 4e83011f72ba3df387512755a17760b42a7bf2f2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 21 Apr 2008 17:58:23 -0400 Subject: Remove more event_context_init() uses from function calls within deep down the code. Make sure we pass around the event_context where we need it instead. All test but a few python ones fail. Jelmer promised to fix them. (This used to be commit 3045d391626fba169aa26be52174883e18d323e9) --- source4/libcli/smb_composite/fetchfile.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/libcli/smb_composite/fetchfile.c') diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index d8d7481270..9cd02a51f4 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -62,7 +62,6 @@ static NTSTATUS fetchfile_connect(struct composite_context *c, state->creq->async.fn = fetchfile_composite_handler; state->stage = FETCHFILE_READ; - c->event_ctx = talloc_reference(c, state->creq->event_ctx); return NT_STATUS_OK; } @@ -158,7 +157,6 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc c->state = COMPOSITE_STATE_IN_PROGRESS; state->stage = FETCHFILE_CONNECT; - c->event_ctx = talloc_reference(c, state->creq->event_ctx); c->private_data = state; return c; -- cgit