svn commit: samba r26646 - in branches/SAMBA_4_0: .
source/libcli/raw source/libcli/smb_composite
source/librpc/rpc source/ntvfs/cifs source/scripting/ejs
source/torture/basic source/torture/raw
jelmer at samba.org
jelmer at samba.org
Wed Jan 2 18:39:16 GMT 2008
Author: jelmer
Date: 2008-01-02 18:39:15 +0000 (Wed, 02 Jan 2008)
New Revision: 26646
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26646
Log:
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.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/libcli/raw/clitree.c
branches/SAMBA_4_0/source/libcli/smb_composite/connect.c
branches/SAMBA_4_0/source/libcli/smb_composite/fetchfile.c
branches/SAMBA_4_0/source/libcli/smb_composite/fsinfo.c
branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h
branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
branches/SAMBA_4_0/source/torture/basic/misc.c
branches/SAMBA_4_0/source/torture/raw/lockbench.c
branches/SAMBA_4_0/source/torture/raw/openbench.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/libcli/raw/clitree.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/clitree.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/libcli/raw/clitree.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -192,6 +192,14 @@
io.in.credentials = credentials;
io.in.fallback_to_anonymous = false;
io.in.workgroup = lp_workgroup(global_loadparm);
+ io.in.max_xmit = lp_max_xmit(global_loadparm);
+ io.in.max_mux = lp_maxmux(global_loadparm);
+ io.in.ntstatus_support = lp_nt_status_support(global_loadparm);
+ io.in.max_protocol = lp_cli_maxprotocol(global_loadparm);
+ io.in.unicode = lp_unicode(global_loadparm);
+ io.in.use_spnego = lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm);
+
+
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/connect.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/connect.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/connect.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -63,8 +63,7 @@
{
struct connect_state *state = talloc_get_type(c->private_data, struct connect_state);
- state->req = smb_raw_negotiate_send(state->transport, lp_unicode(global_loadparm),
- lp_cli_maxprotocol(global_loadparm));
+ state->req = smb_raw_negotiate_send(state->transport, io->in.unicode, io->in.max_protocol);
NT_STATUS_HAVE_NO_MEMORY(state->req);
state->req->async.fn = request_handler;
@@ -308,9 +307,9 @@
/* 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_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm));
+ io->in.max_xmit,
+ io->in.max_mux,
+ io->in.use_spnego);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/fetchfile.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/fetchfile.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/fetchfile.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -147,6 +147,14 @@
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;
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/fsinfo.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/fsinfo.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/fsinfo.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -153,6 +153,14 @@
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);
+
c->state = COMPOSITE_STATE_IN_PROGRESS;
state->stage = FSINFO_CONNECT;
c->event_ctx = talloc_reference(c, tree->session->transport->socket->event.ctx);
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h 2008-01-02 18:39:15 UTC (rev 26646)
@@ -91,6 +91,12 @@
struct cli_credentials *credentials;
bool fallback_to_anonymous;
const char *workgroup;
+ bool use_spnego;
+ bool ntstatus_support;
+ bool unicode;
+ int max_xmit;
+ int max_mux;
+ int max_protocol;
} in;
struct {
struct smbcli_tree *tree;
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -119,6 +119,13 @@
conn->in.service_type = NULL;
conn->in.workgroup = lp_workgroup(lp_ctx);
+ conn->in.max_xmit = lp_max_xmit(lp_ctx);
+ conn->in.max_mux = lp_maxmux(lp_ctx);
+ conn->in.ntstatus_support = lp_nt_status_support(lp_ctx);
+ conn->in.max_protocol = lp_cli_maxprotocol(lp_ctx);
+ conn->in.unicode = lp_unicode(lp_ctx);
+ conn->in.use_spnego = lp_use_spnego(lp_ctx) && lp_nt_status_support(lp_ctx);
+
/*
* provide proper credentials - user supplied, but allow a
* fallback to anonymous if this is an schannel connection
Modified: branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -202,6 +202,12 @@
io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx);
io.in.service = remote_share;
io.in.service_type = "?????";
+ io.in.max_xmit = lp_max_xmit(ntvfs->ctx->lp_ctx);
+ io.in.max_mux = lp_maxmux(ntvfs->ctx->lp_ctx);
+ io.in.ntstatus_support = lp_nt_status_support(ntvfs->ctx->lp_ctx);
+ io.in.max_protocol = lp_cli_maxprotocol(ntvfs->ctx->lp_ctx);
+ io.in.unicode = lp_unicode(ntvfs->ctx->lp_ctx);
+ io.in.use_spnego = lp_use_spnego(ntvfs->ctx->lp_ctx) && lp_nt_status_support(ntvfs->ctx->lp_ctx);
creq = smb_composite_connect_send(&io, private,
lp_resolve_context(ntvfs->ctx->lp_ctx),
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -445,6 +445,12 @@
io.in.credentials = creds;
io.in.fallback_to_anonymous = false;
io.in.workgroup = lp_workgroup(global_loadparm);
+ io.in.max_xmit = lp_max_xmit(global_loadparm);
+ io.in.max_mux = lp_maxmux(global_loadparm);
+ io.in.ntstatus_support = lp_nt_status_support(global_loadparm);
+ io.in.max_protocol = lp_cli_maxprotocol(global_loadparm);
+ io.in.unicode = lp_unicode(global_loadparm);
+ io.in.use_spnego = lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm);
result = smb_composite_connect(&io, mem_ctx,
lp_resolve_context(global_loadparm),
Modified: branches/SAMBA_4_0/source/torture/basic/misc.c
===================================================================
--- branches/SAMBA_4_0/source/torture/basic/misc.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/torture/basic/misc.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -821,6 +821,12 @@
smb->in.credentials=cmdline_credentials;
smb->in.fallback_to_anonymous=false;
smb->in.workgroup=workgroup;
+ smb->in.max_xmit = lp_max_xmit(tctx->lp_ctx);
+ smb->in.max_mux = lp_maxmux(tctx->lp_ctx);
+ smb->in.ntstatus_support = lp_nt_status_support(tctx->lp_ctx);
+ smb->in.max_protocol = lp_cli_maxprotocol(tctx->lp_ctx);
+ smb->in.unicode = lp_unicode(tctx->lp_ctx);
+ smb->in.use_spnego = lp_use_spnego(tctx->lp_ctx) && lp_nt_status_support(tctx->lp_ctx);
return smb_composite_connect_send(smb,mem_ctx,
lp_resolve_context(tctx->lp_ctx),ev);
Modified: branches/SAMBA_4_0/source/torture/raw/lockbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/lockbench.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/torture/raw/lockbench.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -193,6 +193,12 @@
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = false;
io->in.workgroup = lp_workgroup(state->tctx->lp_ctx);
+ io->in.max_xmit = lp_max_xmit(state->tctx->lp_ctx);
+ io->in.max_mux = lp_maxmux(state->tctx->lp_ctx);
+ io->in.ntstatus_support = lp_nt_status_support(state->tctx->lp_ctx);
+ io->in.max_protocol = lp_cli_maxprotocol(state->tctx->lp_ctx);
+ io->in.unicode = lp_unicode(state->tctx->lp_ctx);
+ io->in.use_spnego = lp_use_spnego(state->tctx->lp_ctx) && lp_nt_status_support(state->tctx->lp_ctx);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
Modified: branches/SAMBA_4_0/source/torture/raw/openbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/openbench.c 2008-01-02 18:39:11 UTC (rev 26645)
+++ branches/SAMBA_4_0/source/torture/raw/openbench.c 2008-01-02 18:39:15 UTC (rev 26646)
@@ -131,6 +131,12 @@
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = false;
io->in.workgroup = lp_workgroup(state->tctx->lp_ctx);
+ io->in.max_xmit = lp_max_xmit(state->tctx->lp_ctx);
+ io->in.max_mux = lp_maxmux(state->tctx->lp_ctx);
+ io->in.ntstatus_support = lp_nt_status_support(state->tctx->lp_ctx);
+ io->in.max_protocol = lp_cli_maxprotocol(state->tctx->lp_ctx);
+ io->in.unicode = lp_unicode(state->tctx->lp_ctx);
+ io->in.use_spnego = lp_use_spnego(state->tctx->lp_ctx) && lp_nt_status_support(state->tctx->lp_ctx);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
More information about the samba-cvs
mailing list