Author: jelmer
Date: 2007-12-07 03:01:41 +0000 (Fri, 07 Dec 2007)
New Revision: 26329

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26329

Log:
Fix more loadparm_context references. Only about a 100 left now.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c
   branches/SAMBA_4_0/source/lib/registry/tools/common.c
   branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c
   branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
   branches/SAMBA_4_0/source/lib/registry/tools/regtree.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c
   branches/SAMBA_4_0/source/torture/locktest.c
   branches/SAMBA_4_0/source/torture/nbt/winsbench.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/dsdb/samdb/ldb_modules/proxy.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c    2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c    2007-12-07 
03:01:41 UTC (rev 26329)
@@ -129,7 +129,7 @@
                ldb_oom(module->ldb);
                goto failed;
        }
-       cli_credentials_guess(creds, global_loadparm);
+       cli_credentials_guess(creds, ldb_get_opaque(module->ldb, "loadparm"));
        cli_credentials_set_username(creds, username, CRED_SPECIFIED);
        cli_credentials_set_password(creds, password, CRED_SPECIFIED);
 

Modified: branches/SAMBA_4_0/source/lib/registry/tools/common.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/common.c       2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/lib/registry/tools/common.c       2007-12-07 
03:01:41 UTC (rev 26329)
@@ -24,12 +24,13 @@
 #include "lib/registry/tools/common.h"
 
 struct registry_context *reg_common_open_remote(const char *remote,
+                                               struct loadparm_context *lp_ctx,
                                                struct cli_credentials *creds)
 {
        struct registry_context *h;
        WERROR error;
 
-       error = reg_open_remote(&h, NULL, creds, remote, NULL);
+       error = reg_open_remote(&h, NULL, creds, lp_ctx, remote, NULL);
 
        if (!W_ERROR_IS_OK(error)) {
                fprintf(stderr, "Unable to open remote registry at %s:%s \n",

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c     2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c     2007-12-07 
03:01:41 UTC (rev 26329)
@@ -49,7 +49,7 @@
        }
 
        if (remote) {
-               h = reg_common_open_remote (remote, cmdline_credentials);
+               h = reg_common_open_remote (remote, global_loadparm, 
cmdline_credentials);
        } else {
                h = reg_common_open_local (cmdline_credentials, 
global_loadparm);
        }

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c     2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c     2007-12-07 
03:01:41 UTC (rev 26329)
@@ -497,7 +497,7 @@
        ctx = talloc_zero(NULL, struct regshell_context);
 
        if (remote != NULL) {
-               ctx->registry = reg_common_open_remote(remote,
+               ctx->registry = reg_common_open_remote(remote, global_loadparm, 
                                                       cmdline_credentials);
        } else if (file != NULL) {
                ctx->current = reg_common_open_file(file, cmdline_credentials);

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regtree.c      2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regtree.c      2007-12-07 
03:01:41 UTC (rev 26329)
@@ -129,7 +129,7 @@
        }
 
        if (remote != NULL) {
-               h = reg_common_open_remote(remote, cmdline_credentials);
+               h = reg_common_open_remote(remote, global_loadparm, 
cmdline_credentials);
        } else if (file != NULL) {
                start_key = reg_common_open_file(file, cmdline_credentials);
        } else {

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c      2007-12-07 
02:37:13 UTC (rev 26328)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c      2007-12-07 
03:01:41 UTC (rev 26329)
@@ -224,7 +224,8 @@
 */
 struct composite_context *dcerpc_schannel_key_send(TALLOC_CTX *mem_ctx,
                                                   struct dcerpc_pipe *p,
-                                                  struct cli_credentials 
*credentials)
+                                                  struct cli_credentials 
*credentials,
+                                                  struct loadparm_context 
*lp_ctx)
 {
        struct composite_context *c;
        struct schannel_key_state *s;
@@ -262,7 +263,8 @@
        /* request the netlogon endpoint mapping */
        epm_map_req = dcerpc_epm_map_binding_send(c, s->binding,
                                                  &ndr_table_netlogon,
-                                                 s->pipe->conn->event_ctx);
+                                                 s->pipe->conn->event_ctx,
+                                                 lp_ctx);
        if (composite_nomem(epm_map_req, c)) return c;
 
        composite_continue(c, epm_map_req, continue_epm_map_binding, c);
@@ -371,7 +373,7 @@
        s->lp_ctx      = lp_ctx;
 
        /* start getting schannel key first */
-       schan_key_req = dcerpc_schannel_key_send(c, p, credentials);
+       schan_key_req = dcerpc_schannel_key_send(c, p, credentials, lp_ctx);
        if (composite_nomem(schan_key_req, c)) return c;
 
        composite_continue(c, schan_key_req, continue_schannel_key, c);

Modified: branches/SAMBA_4_0/source/torture/locktest.c
===================================================================
--- branches/SAMBA_4_0/source/torture/locktest.c        2007-12-07 02:37:13 UTC 
(rev 26328)
+++ branches/SAMBA_4_0/source/torture/locktest.c        2007-12-07 03:01:41 UTC 
(rev 26329)
@@ -168,7 +168,8 @@
 }
 
 
-static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int 
fnum[NSERVERS][NCONNECTIONS][NFILES],
+static void reconnect(struct loadparm_context *lp_ctx,
+                     struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int 
fnum[NSERVERS][NCONNECTIONS][NFILES],
                      char *share[NSERVERS])
 {
        int server, conn, f;
@@ -184,7 +185,7 @@
                        }
                        talloc_free(cli[server][conn]);
                }
-               cli[server][conn] = connect_one(global_loadparm, share[server], 
+               cli[server][conn] = connect_one(lp_ctx, share[server], 
                                                server, conn);
                if (!cli[server][conn]) {
                        DEBUG(0,("Failed to connect to %s\n", share[server]));
@@ -387,7 +388,7 @@
    we then do random locking ops in tamdem on the 4 fnums from each
    server and ensure that the results match
  */
-static void test_locks(char *share[NSERVERS])
+static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
 {
        struct smbcli_state *cli[NSERVERS][NCONNECTIONS];
        int fnum[NSERVERS][NCONNECTIONS][NFILES];
@@ -438,7 +439,7 @@
 #endif
        }
 
-       reconnect(cli, fnum, share);
+       reconnect(lp_ctx, cli, fnum, share);
        open_files(cli, fnum);
        n = retest(cli, fnum, numops);
 
@@ -451,7 +452,7 @@
                n1 = n;
 
                close_files(cli, fnum);
-               reconnect(cli, fnum, share);
+               reconnect(lp_ctx, cli, fnum, share);
                open_files(cli, fnum);
 
                for (i=0;i<n-skip;i+=skip) {
@@ -489,7 +490,7 @@
        }
 
        close_files(cli, fnum);
-       reconnect(cli, fnum, share);
+       reconnect(lp_ctx, cli, fnum, share);
        open_files(cli, fnum);
        showall = true;
        n1 = retest(cli, fnum, n);
@@ -649,7 +650,7 @@
                 seed, lock_base, lock_range, min_length));
        srandom(seed);
 
-       test_locks(share);
+       test_locks(lp_ctx, share);
 
        return(0);
 }

Modified: branches/SAMBA_4_0/source/torture/nbt/winsbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsbench.c   2007-12-07 02:37:13 UTC 
(rev 26328)
+++ branches/SAMBA_4_0/source/torture/nbt/winsbench.c   2007-12-07 03:01:41 UTC 
(rev 26329)
@@ -35,6 +35,7 @@
        int pass_count;
        int fail_count;
        const char *wins_server;
+       uint16_t wins_port;
        const char *my_ip;
        uint32_t ttl;
 };
@@ -185,7 +186,7 @@
 
        io.in.name            = generate_name(tmp_ctx, idx);
        io.in.dest_addr       = state->wins_server;
-       io.in.dest_port       = lp_nbt_port(global_loadparm);
+       io.in.dest_port       = state->wins_port;
        io.in.broadcast       = false;
        io.in.wins_lookup     = true;
        io.in.timeout         = 2;
@@ -241,6 +242,7 @@
        state->num_names = torture_entries;
        state->registered = talloc_zero_array(state, bool, state->num_names);
        state->wins_server = address;
+       state->wins_port = lp_nbt_port(tctx->lp_ctx);
        state->my_ip = talloc_strdup(tctx, iface_best_ip(tctx->lp_ctx, 
address));
        state->ttl = timelimit;
 

Reply via email to