Remove another use of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 00:03:26 +0000 (01:03 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 00:03:26 +0000 (01:03 +0100)
12 files changed:
source4/auth/ntlm/auth_server.c
source4/libcli/raw/clitree.c
source4/libcli/smb_composite/connect.c
source4/libcli/smb_composite/fetchfile.c
source4/libcli/smb_composite/fsinfo.c
source4/libcli/smb_composite/smb_composite.h
source4/librpc/rpc/dcerpc_connect.c
source4/ntvfs/cifs/vfs_cifs.c
source4/torture/basic/misc.c
source4/torture/raw/composite.c
source4/torture/raw/lockbench.c
source4/torture/raw/openbench.c

index 0b1e091eeac2196f35ac47b387c6ce54b130d850..eeecfbce15c5afce292b357bc1f38c29b6f73ca7 100644 (file)
@@ -66,6 +66,7 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
                return NT_STATUS_INTERNAL_ERROR;
        }
        io.in.dest_ports = lp_smb_ports(ctx->auth_ctx->lp_ctx); 
+       io.in.socket_options = lp_socket_options(ctx->auth_ctx->lp_ctx);
 
        io.in.called_name = strupper_talloc(mem_ctx, io.in.dest_host);
 
index 61cbfa7ecb0be706c03144bf983f8b58e69c59be..8640a25747638bff7b35b6a070bfe993a0cba80c 100644 (file)
@@ -173,6 +173,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
                                     struct smbcli_tree **ret_tree, 
                                     const char *dest_host, const char **dest_ports,
                                     const char *service, const char *service_type,
+                                        const char *socket_options,
                                     struct cli_credentials *credentials,
                                     struct resolve_context *resolve_ctx,
                                     struct event_context *ev,
@@ -189,6 +190,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
 
        io.in.dest_host = dest_host;
        io.in.dest_ports = dest_ports;
+       io.in.socket_options = socket_options;
        io.in.called_name = strupper_talloc(tmp_ctx, dest_host);
        io.in.service = service;
        io.in.service_type = service_type;
index 4a73acfd57125b9cf607981306b7895d19f653dd..7508035f48f4fe27bef01d72d193ac0710840c3e 100644 (file)
@@ -377,7 +377,7 @@ static NTSTATUS connect_resolve(struct composite_context *c,
                                               io->in.dest_ports,
                                               io->in.dest_host, 
                                               NULL, c->event_ctx, 
-                                                  lp_socket_options(global_loadparm));
+                                                 io->in.socket_options);
        NT_STATUS_HAVE_NO_MEMORY(state->creq);
 
        state->stage = CONNECT_SOCKET;
index cbe2289a55f05ad9acd82df63030568423e7a6f2..6dc2ae8c8f1af39840be8fcec2b696ad007df26b 100644 (file)
@@ -138,6 +138,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
 
        state->connect->in.dest_host    = io->in.dest_host;
        state->connect->in.dest_ports   = io->in.ports;
+       state->connect->in.socket_options = io->in.socket_options;
        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;
index f148fb8bf64bb147f66c997f7bbd3a466f975e3e..8f5339fa057996ef13888cf755135a106b28b453 100644 (file)
@@ -146,6 +146,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
 
        state->connect->in.dest_host    = io->in.dest_host;
        state->connect->in.dest_ports   = io->in.dest_ports;
+       state->connect->in.socket_options = io->in.socket_options;
        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;
index fd1b95e64f01a5b7ee55793dc1d3d8184ad1e98d..2b1e368daa516c15a9efffddee53d417c210d717 100644 (file)
@@ -53,6 +53,7 @@ struct smb_composite_fetchfile {
                const char *called_name;
                const char *service;
                const char *service_type;
+               const char *socket_options;
                struct cli_credentials *credentials;
                const char *workgroup;
                const char *filename;
@@ -93,6 +94,7 @@ struct smb_composite_connect {
        struct {
                const char *dest_host;
                const char **dest_ports;
+               const char *socket_options;
                const char *called_name;
                const char *service;
                const char *service_type;
@@ -133,6 +135,7 @@ struct smb_composite_fsinfo {
        struct {
                const char *dest_host;
                const char **dest_ports;
+               const char *socket_options;
                const char *called_name;
                const char *service;
                const char *service_type;
index cdfbb31c4ad936b52bf361c97b996391786391f7..8d03f9cde32a33d988c178afc2f548dfde128a3f 100644 (file)
@@ -116,6 +116,7 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CT
                conn->in.called_name = "*SMBSERVER"; /* FIXME: This is invalid */
        else
                conn->in.called_name            = s->io.binding->target_hostname;
+       conn->in.socket_options         = lp_socket_options(lp_ctx);
        conn->in.service                = "IPC$";
        conn->in.service_type           = NULL;
        conn->in.workgroup              = lp_workgroup(lp_ctx);
index 14bf79ecf6cbb61ac128843382ccde17834f8c8e..27d5b9de5a3d8a8c94d26a733a678b756f3b0436 100644 (file)
@@ -199,6 +199,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
        /* connect to the server, using the smbd event context */
        io.in.dest_host = host;
        io.in.dest_ports = lp_smb_ports(ntvfs->ctx->lp_ctx);
+       io.in.socket_options = lp_socket_options(ntvfs->ctx->lp_ctx);
        io.in.called_name = host;
        io.in.credentials = credentials;
        io.in.fallback_to_anonymous = false;
index 89e716988393ac123785035998183a48be819315..c19b08e617ad419304fa947104f5f5475aa854f5 100644 (file)
@@ -817,6 +817,7 @@ static struct composite_context *torture_connect_async(
        smb->in.dest_host=talloc_strdup(mem_ctx,host);
        smb->in.service=talloc_strdup(mem_ctx,share);
        smb->in.dest_ports=lp_smb_ports(tctx->lp_ctx);
+       smb->in.socket_options = lp_socket_options(tctx->lp_ctx);
        smb->in.called_name = strupper_talloc(mem_ctx, host);
        smb->in.service_type=NULL;
        smb->in.credentials=cmdline_credentials;
index 16de4308bb3a920999f83fab75ca8a99f4c890e7..6eb4fe0e67e98abe4cdad17141d0909f1f6ec9eb 100644 (file)
@@ -347,6 +347,7 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
 
        io1.in.dest_host = torture_setting_string(tctx, "host", NULL);
        io1.in.dest_ports = lp_smb_ports(tctx->lp_ctx);
+       io1.in.socket_options = lp_socket_options(tctx->lp_ctx);
        io1.in.called_name = torture_setting_string(tctx, "host", NULL);
        io1.in.service = torture_setting_string(tctx, "share", NULL);
        io1.in.service_type = "A:";
index a6dce8a9266d0e42a3df985350f729760ba66432..681d37bddb8c6536737b2db430bee5626b9039db 100644 (file)
@@ -188,6 +188,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te,
 
        io->in.dest_host    = state->dest_host;
        io->in.dest_ports   = state->dest_ports;
+       io->in.socket_options = lp_socket_options(state->tctx->lp_ctx);
        io->in.called_name  = state->called_name;
        io->in.service      = share;
        io->in.service_type = state->service_type;
@@ -340,6 +341,7 @@ bool torture_bench_lock(struct torture_context *torture)
                }
                talloc_steal(mem_ctx, state);
                state[i].tree = cli->tree;
+               state[i].socket_options = lp_socket_options(torture->lp_ctx);
                state[i].dest_host = talloc_strdup(state[i].mem_ctx, 
                                                   cli->tree->session->transport->socket->hostname);
                state[i].dest_ports = talloc_array(state[i].mem_ctx, 
index ec94637445a3b0f73a3488342ff4be7b0c1237ce..9e9f27af6bfbf3646cc6eea5c11307d45c99ec35 100644 (file)
@@ -130,6 +130,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te,
 
        io->in.dest_host    = state->dest_host;
        io->in.dest_ports   = state->dest_ports;
+       io->in.socket_options = lp_socket_options(state->tctx->lp_ctx);
        io->in.called_name  = state->called_name;
        io->in.service      = share;
        io->in.service_type = state->service_type;
@@ -400,6 +401,7 @@ bool torture_bench_open(struct torture_context *torture)
                state[i].dest_ports[0] = talloc_asprintf(state[i].dest_ports, 
                                                         "%u", state[i].cli->tree->session->transport->socket->port);
                state[i].dest_ports[1] = NULL;
+               state[i].socket_options = lp_socket_options(torture->lp_ctx);
                state[i].called_name  = talloc_strdup(state[i].mem_ctx,
                                                      state[i].cli->tree->session->transport->called.name);
                state[i].service_type = talloc_strdup(state[i].mem_ctx,