diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-04 00:12:13 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:01 +0100 |
commit | b038240ac72fa34a132eb52bda28bbb80f82c29e (patch) | |
tree | 8870bbb7b50ce698806bc0f2210204b98e38c19a /source4/torture | |
parent | fc2f06d31b6b52c5cbd83f34a34e5107649a5134 (diff) | |
download | samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.gz samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.bz2 samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.zip |
r26275: return loadparm context in lp_load.
(This used to be commit d01f0f4c2037b531b3fd088060717f90e60471e9)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/gentest.c | 9 | ||||
-rw-r--r-- | source4/torture/locktest.c | 13 | ||||
-rw-r--r-- | source4/torture/locktest2.c | 3 | ||||
-rw-r--r-- | source4/torture/masktest.c | 9 |
4 files changed, 19 insertions, 15 deletions
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index fa352a3e9e..edc1b0754a 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -2172,6 +2172,7 @@ static bool split_unc_name(const char *unc, char **server, char **share) int opt; int i, username_count=0; bool ret; + struct loadparm_context *lp_ctx; setlinebuf(stdout); @@ -2196,12 +2197,12 @@ static bool split_unc_name(const char *unc, char **server, char **share) argc -= NSERVERS; argv += NSERVERS; - lp_load(dyn_CONFIGFILE); + lp_load(dyn_CONFIGFILE, &lp_ctx); servers[0].credentials = cli_credentials_init(talloc_autofree_context()); servers[1].credentials = cli_credentials_init(talloc_autofree_context()); - cli_credentials_guess(servers[0].credentials, global_loadparm); - cli_credentials_guess(servers[1].credentials, global_loadparm); + cli_credentials_guess(servers[0].credentials, lp_ctx); + cli_credentials_guess(servers[1].credentials, lp_ctx); options.seed = time(NULL); options.numops = 1000; @@ -2265,7 +2266,7 @@ static bool split_unc_name(const char *unc, char **server, char **share) } } - gensec_init(global_loadparm); + gensec_init(lp_ctx); if (username_count == 0) { usage(); diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c index 381abaebc6..2aa074c6c3 100644 --- a/source4/torture/locktest.c +++ b/source4/torture/locktest.c @@ -543,6 +543,7 @@ static void usage(void) int opt; int seed, server; int username_count=0; + struct loadparm_context *lp_ctx; setlinebuf(stdout); @@ -563,12 +564,12 @@ static void usage(void) argc -= NSERVERS; argv += NSERVERS; - lp_load(dyn_CONFIGFILE); + lp_load(dyn_CONFIGFILE, &lp_ctx); servers[0] = cli_credentials_init(talloc_autofree_context()); servers[1] = cli_credentials_init(talloc_autofree_context()); - cli_credentials_guess(servers[0], global_loadparm); - cli_credentials_guess(servers[1], global_loadparm); + cli_credentials_guess(servers[0], lp_ctx); + cli_credentials_guess(servers[1], lp_ctx); seed = time(NULL); @@ -617,10 +618,10 @@ static void usage(void) exact_error_codes = true; break; case 'l': - lp_set_cmdline(global_loadparm, "torture:unclist", optarg); + lp_set_cmdline(lp_ctx, "torture:unclist", optarg); break; case 'W': - lp_set_cmdline(global_loadparm, "workgroup", optarg); + lp_set_cmdline(lp_ctx, "workgroup", optarg); break; case 'h': usage(); @@ -639,7 +640,7 @@ static void usage(void) servers[1] = servers[0]; } - gensec_init(global_loadparm); + gensec_init(lp_ctx); argc -= optind; argv += optind; diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c index 55edd4aa17..1798e485ea 100644 --- a/source4/torture/locktest2.c +++ b/source4/torture/locktest2.c @@ -460,6 +460,7 @@ static void usage(void) int opt; char *p; int seed; + struct loadparm_context *lp_ctx; setlinebuf(stdout); @@ -483,7 +484,7 @@ static void usage(void) argc -= 4; argv += 4; - lp_load(dyn_CONFIGFILE); + lp_load(dyn_CONFIGFILE, &lp_ctx); if (getenv("USER")) { fstrcpy(username,getenv("USER")); diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c index 2b3c92db0c..2455361e10 100644 --- a/source4/torture/masktest.c +++ b/source4/torture/masktest.c @@ -281,6 +281,7 @@ static void usage(void) struct smbcli_state *cli; int opt; int seed; + struct loadparm_context *lp_ctx; setlinebuf(stdout); @@ -302,10 +303,10 @@ static void usage(void) argc -= 1; argv += 1; - lp_load(dyn_CONFIGFILE); + lp_load(dyn_CONFIGFILE, &lp_ctx); credentials = cli_credentials_init(talloc_autofree_context()); - cli_credentials_guess(credentials, global_loadparm); + cli_credentials_guess(credentials, lp_ctx); seed = time(NULL); @@ -326,7 +327,7 @@ static void usage(void) verbose++; break; case 'M': - lp_set_cmdline(global_loadparm, "max protocol", optarg); + lp_set_cmdline(lp_ctx, "max protocol", optarg); break; case 'U': cli_credentials_parse_string(credentials, optarg, CRED_SPECIFIED); @@ -358,7 +359,7 @@ static void usage(void) } } - gensec_init(global_loadparm); + gensec_init(lp_ctx); argc -= optind; argv += optind; |