summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-29 18:00:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:31 -0500
commit60a1046c5c5783799bd64fe18e03534670f83d82 (patch)
tree48f788a6a6fbed5af0a3f3eea1e4373d70b03e5b /source4/torture
parent98038f71a7b072912c974d131012335ca22c5259 (diff)
downloadsamba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.gz
samba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.bz2
samba-60a1046c5c5783799bd64fe18e03534670f83d82.zip
r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c10
-rw-r--r--source4/torture/local/iconv.c2
-rw-r--r--source4/torture/locktest.c2
-rw-r--r--source4/torture/raw/composite.c20
-rw-r--r--source4/torture/raw/context.c12
-rw-r--r--source4/torture/raw/eas.c8
-rw-r--r--source4/torture/raw/lock.c4
-rw-r--r--source4/torture/raw/lockbench.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/notify.c2
-rw-r--r--source4/torture/raw/open.c8
-rwxr-xr-xsource4/torture/raw/pingpong.c10
-rw-r--r--source4/torture/raw/read.c6
-rw-r--r--source4/torture/raw/unlink.c10
-rw-r--r--source4/torture/rpc/bench.c4
-rw-r--r--source4/torture/rpc/countcalls.c2
-rw-r--r--source4/torture/rpc/drsuapi.c16
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c2
-rw-r--r--source4/torture/rpc/dssync.c28
-rw-r--r--source4/torture/rpc/lsa.c12
-rw-r--r--source4/torture/rpc/samba3rpc.c2
-rw-r--r--source4/torture/rpc/samr.c16
-rw-r--r--source4/torture/rpc/schannel.c2
-rw-r--r--source4/torture/rpc/testjoin.c6
-rw-r--r--source4/torture/smb2/connect.c4
-rw-r--r--source4/torture/smb2/getinfo.c2
-rw-r--r--source4/torture/smb2/util.c4
-rw-r--r--source4/torture/smbtorture.c2
-rw-r--r--source4/torture/ui.c8
-rw-r--r--source4/torture/unix/whoami.c4
-rw-r--r--source4/torture/util_smb.c10
31 files changed, 111 insertions, 111 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 5338d480bc..c5372eff08 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -442,7 +442,7 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
return werror_to_ntstatus(status);
}
- if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
for (i=0; i < objs->num_objects; i++) {
struct ldb_ldif ldif;
fprintf(stdout, "#\n");
@@ -670,7 +670,7 @@ static NTSTATUS test_become_dc_store_chunk(void *private_data,
return werror_to_ntstatus(status);
}
- if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
for (i=0; i < objs->num_objects; i++) {
struct ldb_ldif ldif;
fprintf(stdout, "#\n");
@@ -700,7 +700,7 @@ static NTSTATUS test_become_dc_store_chunk(void *private_data,
return NT_STATUS_FOOBAR;
}
- if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
DEBUG(0,("# %s\n", sa->lDAPDisplayName));
NDR_PRINT_DEBUG(drsuapi_DsReplicaLinkedAttribute, &linked_attributes[i]);
dump_data(0,
@@ -726,7 +726,7 @@ BOOL torture_net_become_dc(struct torture_context *torture)
s = talloc_zero(torture, struct test_become_dc_state);
if (!s) return False;
- s->netbios_name = lp_parm_string(NULL, "become dc", "smbtorture dc");
+ s->netbios_name = lp_parm_string(global_loadparm, NULL, "become dc", "smbtorture dc");
if (!s->netbios_name || !s->netbios_name[0]) {
s->netbios_name = "smbtorturedc";
}
@@ -834,7 +834,7 @@ BOOL torture_net_become_dc(struct torture_context *torture)
goto cleanup;
}
- if (lp_parm_bool(NULL, "become dc", "do not unjoin", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "become dc", "do not unjoin", false)) {
talloc_free(s);
return ret;
}
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 06659b5e9c..e9d270b3a8 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -34,7 +34,7 @@ static bool iconv_untestable(struct torture_context *tctx)
{
iconv_t cd;
- if (!lp_parm_bool(NULL, "iconv", "native", true))
+ if (!lp_parm_bool(global_loadparm, NULL, "iconv", "native", true))
torture_skip(tctx, "system iconv disabled - skipping test");
cd = iconv_open("UTF-16LE", "UCS-4LE");
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index fc339bfcc5..562defe09e 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -124,7 +124,7 @@ static struct smbcli_state *connect_one(char *share, int snum, int conn)
char **unc_list = NULL;
int num_unc_names;
const char *p;
- p = lp_parm_string(NULL, "torture", "unclist");
+ p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
if (p) {
char *h, *s;
unc_list = file_lines_load(p, &num_unc_names, NULL);
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index ab406f8624..d713ff321e 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -87,7 +87,7 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("waiting for completion\n");
while (*count != num_ops) {
event_loop_once(cli->transport->socket->event.ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -152,10 +152,10 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- io2.in.dest_host = lp_parm_string(NULL, "torture", "host");
+ io2.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
io2.in.port = 0;
- io2.in.called_name = lp_parm_string(NULL, "torture", "host");
- io2.in.service = lp_parm_string(NULL, "torture", "share");
+ io2.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ io2.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
io2.in.service_type = "A:";
io2.in.credentials = cmdline_credentials;
@@ -177,7 +177,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
while (*count != torture_numops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -297,7 +297,7 @@ static BOOL test_appendacl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("waiting for completion\n");
while (*count != num_ops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
@@ -340,10 +340,10 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
int *count = talloc_zero(mem_ctx, int);
BOOL ret = True;
- io1.in.dest_host = lp_parm_string(NULL, "torture", "host");
+ io1.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
io1.in.port = 0;
- io1.in.called_name = lp_parm_string(NULL, "torture", "host");
- io1.in.service = lp_parm_string(NULL, "torture", "share");
+ io1.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ io1.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
io1.in.service_type = "A:";
io1.in.credentials = cmdline_credentials;
io1.in.workgroup = lp_workgroup(global_loadparm);
@@ -364,7 +364,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
while (*count < torture_numops) {
event_loop_once(event_ctx);
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
}
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index af3c56fb27..8c1c14d783 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -277,8 +277,8 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create a second tree context on the same session\n");
tree = smbcli_tree_init(cli->session, mem_ctx, False);
@@ -385,8 +385,8 @@ static BOOL test_tree_ulogoff(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create the first new sessions\n");
session1 = smbcli_session_init(cli->transport, mem_ctx, False);
@@ -746,8 +746,8 @@ static BOOL test_pid_2tcon(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return False;
}
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
printf("create a second tree context on the same session\n");
tree = smbcli_tree_init(cli->session, mem_ctx, False);
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 810667134a..368a24dbae 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -247,10 +247,10 @@ static BOOL test_max_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("TESTING SETFILEINFO MAX. EA_SET\n");
- maxeasize = lp_parm_int(NULL, "torture", "maxeasize", 65536);
- maxeanames = lp_parm_int(NULL, "torture", "maxeanames", 101);
- maxeastart = lp_parm_int(NULL, "torture", "maxeastart", 1);
- maxeadebug = lp_parm_int(NULL, "torture", "maxeadebug", 0);
+ maxeasize = lp_parm_int(global_loadparm, NULL, "torture", "maxeasize", 65536);
+ maxeanames = lp_parm_int(global_loadparm, NULL, "torture", "maxeanames", 101);
+ maxeastart = lp_parm_int(global_loadparm, NULL, "torture", "maxeastart", 1);
+ maxeadebug = lp_parm_int(global_loadparm, NULL, "torture", "maxeadebug", 0);
/* Do some sanity check on possibly passed parms */
if (maxeasize <= 0) {
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 245a15d269..f55d37330a 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -599,8 +599,8 @@ static bool test_async(struct torture_context *tctx,
session->vuid = setup.out.vuid;
printf("create new tree context\n");
- share = lp_parm_string(NULL, "torture", "share");
- host = lp_parm_string(NULL, "torture", "host");
+ share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+ host = lp_parm_string(global_loadparm, NULL, "torture", "host");
tree = smbcli_tree_init(session, tctx, False);
tcon.generic.level = RAW_TCON_TCONX;
tcon.tconx.in.flags = 0;
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index 97509606c3..d55a0a012e 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -318,7 +318,7 @@ BOOL torture_bench_lock(struct torture_context *torture)
progress = torture_setting_bool(torture, "progress", true);
- nprocs = lp_parm_int(NULL, "torture", "nprocs", 4);
+ nprocs = lp_parm_int(global_loadparm, NULL, "torture", "nprocs", 4);
state = talloc_zero_array(mem_ctx, struct benchlock_state, nprocs);
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index 2df2c6c84e..ad7027938d 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -130,7 +130,7 @@ static BOOL test_mkdir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
md.t2mkdir.in.eas[2].value = data_blob_talloc(mem_ctx, "xx1", 3);
status = smb_raw_mkdir(cli->tree, &md);
- if (lp_parm_bool(NULL, "torture", "samba3", false)
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)
&& NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)) {
d_printf("EAS not supported -- not treating as fatal\n");
}
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index b9d1d07b5e..d086dcbfde 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -711,7 +711,7 @@ static BOOL test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NOTIFY_ACTION_MODIFIED,
FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("Samba3 does not yet support create times "
"everywhere\n");
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index c0a32e00f4..c75d8f6bfc 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -398,7 +398,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.file_attrs = FILE_ATTRIBUTE_SYSTEM;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_ALL_INFO(FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE,
attrib & ~(FILE_ATTRIBUTE_NONINDEXED|
FILE_ATTRIBUTE_SPARSE));
@@ -569,7 +569,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
if ((io.t2open.in.num_eas != 0)
&& NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)
- && lp_parm_bool(NULL, "torture", "samba3", false)) {
+ && lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("(%s) EAs not supported, not treating as fatal "
"in Samba3 test\n", __location__);
io.t2open.in.num_eas = 0;
@@ -1346,8 +1346,8 @@ static BOOL test_raw_open_multi(void)
struct smbcli_state **clients;
struct smbcli_request **requests;
union smb_open *ios;
- const char *host = lp_parm_string(NULL, "torture", "host");
- const char *share = lp_parm_string(NULL, "torture", "share");
+ const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
int i, num_files = 3;
struct event_context *ev;
int num_ok = 0;
diff --git a/source4/torture/raw/pingpong.c b/source4/torture/raw/pingpong.c
index 6d84ff1ae9..269208b97f 100755
--- a/source4/torture/raw/pingpong.c
+++ b/source4/torture/raw/pingpong.c
@@ -191,21 +191,21 @@ bool torture_ping_pong(struct torture_context *torture)
uint8_t *val;
int count, loops;
- fn = lp_parm_string(NULL, "torture", "filename");
+ fn = lp_parm_string(global_loadparm, NULL, "torture", "filename");
if (fn == NULL) {
DEBUG(0,("You must specify the filename using --option=torture:filename=...\n"));
return false;
}
- num_locks = lp_parm_int(NULL, "torture", "num_locks", -1);
+ num_locks = lp_parm_int(global_loadparm, NULL, "torture", "num_locks", -1);
if (num_locks == -1) {
DEBUG(0,("You must specify num_locks using --option=torture:num_locks=...\n"));
return false;
}
- do_reads = lp_parm_bool(NULL, "torture", "read", false);
- do_writes = lp_parm_bool(NULL, "torture", "write", false);
- lock_timeout = lp_parm_int(NULL, "torture", "lock_timeout", 100000);
+ do_reads = lp_parm_bool(global_loadparm, NULL, "torture", "read", false);
+ do_writes = lp_parm_bool(global_loadparm, NULL, "torture", "write", false);
+ lock_timeout = lp_parm_int(global_loadparm, NULL, "torture", "lock_timeout", 100000);
if (!torture_open_connection(&cli, 0)) {
DEBUG(0,("Could not open connection\n"));
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 61bf027ae8..9a5153b553 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -482,7 +482,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
CHECK_VALUE(io.readx.out.compaction_mode, 0);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 80000);
} else {
@@ -526,7 +526,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
io.readx.in.maxcnt = 0x10000;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 0x10000);
} else {
@@ -536,7 +536,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
io.readx.in.maxcnt = 0x10001;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
printf("SAMBA3: large read extension\n");
CHECK_VALUE(io.readx.out.nread, 0x10001);
} else {
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 88f9a71aaf..287a8b3458 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -129,7 +129,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
/*
* In Samba3 we gave up upon getting the error codes in
* wildcard unlink correct. Trying gentest showed that this is
@@ -157,7 +157,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\t*";
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
}
else {
@@ -169,7 +169,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\*.dat";
io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
}
else {
@@ -179,7 +179,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
io.unlink.in.pattern = BASEDIR "\\*.tx?";
io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
- if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
}
else {
@@ -282,7 +282,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- if (!lp_parm_bool(NULL, "torture", "samba3", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
/*
* Known deficiency, also skipped in base-delete.
diff --git a/source4/torture/rpc/bench.c b/source4/torture/rpc/bench.c
index 7f71723e6d..9880393cdd 100644
--- a/source4/torture/rpc/bench.c
+++ b/source4/torture/rpc/bench.c
@@ -72,7 +72,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct timeval tv = timeval_current();
BOOL ret = True;
- int timelimit = lp_parm_int(NULL, "torture", "timelimit", 10);
+ int timelimit = lp_parm_int(global_loadparm, NULL, "torture", "timelimit", 10);
int count=0;
printf("Running for %d seconds\n", timelimit);
@@ -82,7 +82,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
talloc_free(tmp_ctx);
count++;
if (count % 50 == 0) {
- if (lp_parm_bool(NULL, "torture", "progress", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
printf("%.1f queries per second \r",
count / timeval_elapsed(&tv));
}
diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c
index 0d3df0ffb3..eba20e6361 100644
--- a/source4/torture/rpc/countcalls.c
+++ b/source4/torture/rpc/countcalls.c
@@ -111,7 +111,7 @@ BOOL torture_rpc_countcalls(struct torture_context *torture)
if (!mem_ctx) {
return False;
}
- iface_name = lp_parm_string(NULL, "countcalls", "interface");
+ iface_name = lp_parm_string(global_loadparm, NULL, "countcalls", "interface");
if (iface_name != NULL) {
iface = ndr_table_by_name(iface_name);
if (!iface) {
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 42c0cc8bda..770f73871a 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -307,7 +307,7 @@ static BOOL test_DsReplicaGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
};
- if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
printf("skipping DsReplicaGetInfo test against Samba4\n");
return True;
}
@@ -380,12 +380,12 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
};
- if (!lp_parm_bool(NULL, "torture", "dangerous", False)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", False)) {
printf("DsReplicaSync disabled - enable dangerous tests to use\n");
return True;
}
- if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
printf("skipping DsReplicaSync test against Samba4\n");
return True;
}
@@ -448,7 +448,7 @@ static BOOL test_DsReplicaUpdateRefs(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
};
- if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
printf("skipping DsReplicaUpdateRefs test against Samba4\n");
return True;
}
@@ -515,7 +515,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
};
- if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
printf("skipping DsGetNCChanges test against Samba4\n");
return True;
}
@@ -544,7 +544,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.req.req5.highwatermark.highest_usn = 0;
r.in.req.req5.uptodateness_vector = NULL;
r.in.req.req5.replica_flags = 0;
- if (lp_parm_bool(NULL, "drsuapi","compression", False)) {
+ if (lp_parm_bool(global_loadparm, NULL, "drsuapi","compression", False)) {
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
r.in.req.req5.max_object_count = 0;
@@ -566,10 +566,10 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.req.req8.highwatermark.highest_usn = 0;
r.in.req.req8.uptodateness_vector = NULL;
r.in.req.req8.replica_flags = 0;
- if (lp_parm_bool(NULL,"drsuapi","compression",False)) {
+ if (lp_parm_bool(global_loadparm, NULL,"drsuapi","compression",False)) {
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
- if (lp_parm_bool(NULL,"drsuapi","neighbour_writeable",True)) {
+ if (lp_parm_bool(global_loadparm, NULL,"drsuapi","neighbour_writeable",True)) {
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
}
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index 153d41a8e9..d3530dae19 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -589,7 +589,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
.comment = "display name for Microsoft Support Account",
.status = DRSUAPI_DS_NAME_STATUS_OK,
.alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE,
- .skip = lp_parm_bool(NULL, "torture", "samba4", False)
+ .skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)
},
{
.format_offered = DRSUAPI_DS_NAME_FORMAT_GUID,
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 79063e86da..347b1a5bc7 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -84,7 +84,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx)
struct DsSyncTest *ctx;
struct drsuapi_DsBindInfo28 *our_bind_info28;
struct drsuapi_DsBindInfoCtr *our_bind_info_ctr;
- const char *binding = lp_parm_string(NULL, "torture", "binding");
+ const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
ctx = talloc_zero(mem_ctx, struct DsSyncTest);
if (!ctx) return NULL;
@@ -149,7 +149,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx)
our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3;
our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7;
our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT;
- if (lp_parm_bool(NULL, "dssync", "xpress", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "xpress", false)) {
our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS;
}
our_bind_info28->site_guid = GUID_zero();
@@ -420,11 +420,11 @@ static void test_analyse_objects(struct DsSyncTest *ctx,
static uint32_t object_id;
const char *save_values_dir;
- if (!lp_parm_bool(NULL,"dssync","print_pwd_blobs", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL,"dssync","print_pwd_blobs", false)) {
return;
}
- save_values_dir = lp_parm_string(NULL, "dssync", "save_pwd_blobs_dir");
+ save_values_dir = lp_parm_string(global_loadparm, NULL, "dssync", "save_pwd_blobs_dir");
for (; cur; cur = cur->next_object) {
const char *dn;
@@ -560,17 +560,17 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
ZERO_STRUCT(null_guid);
ZERO_STRUCT(null_sid);
- partition = lp_parm_string(NULL, "dssync", "partition");
+ partition = lp_parm_string(global_loadparm, NULL, "dssync", "partition");
if (partition == NULL) {
partition = ctx->domain_dn;
printf("dssync:partition not specified, defaulting to %s.\n", ctx->domain_dn);
}
- highest_usn = lp_parm_int(NULL, "dssync", "highest_usn", 0);
+ highest_usn = lp_parm_int(global_loadparm, NULL, "dssync", "highest_usn", 0);
- array[0].level = lp_parm_int(NULL, "dssync", "get_nc_changes_level", array[0].level);
+ array[0].level = lp_parm_int(global_loadparm, NULL, "dssync", "get_nc_changes_level", array[0].level);
- if (lp_parm_bool(NULL, "dssync", "print_pwd_blobs", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "print_pwd_blobs", false)) {
const struct samr_Password *nthash;
nthash = cli_credentials_get_nt_hash(ctx->new_dc.credentials, ctx);
if (nthash) {
@@ -606,10 +606,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
r.in.req.req5.highwatermark.highest_usn = highest_usn;
r.in.req.req5.uptodateness_vector = NULL;
r.in.req.req5.replica_flags = 0;
- if (lp_parm_bool(NULL, "dssync", "compression", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) {
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
- if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) {
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
}
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -637,10 +637,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
r.in.req.req8.highwatermark.highest_usn = highest_usn;
r.in.req.req8.uptodateness_vector = NULL;
r.in.req.req8.replica_flags = 0;
- if (lp_parm_bool(NULL, "dssync", "compression", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) {
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
- if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) {
+ if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) {
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
}
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -760,8 +760,8 @@ static BOOL test_FetchNT4Data(struct DsSyncTest *ctx)
r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle;
r.in.level = 1;
- r.in.req.req1.unknown1 = lp_parm_int(NULL, "dssync", "nt4-1", 3);
- r.in.req.req1.unknown2 = lp_parm_int(NULL, "dssync", "nt4-2", 0x00004000);
+ r.in.req.req1.unknown1 = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-1", 3);
+ r.in.req.req1.unknown2 = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-2", 0x00004000);
while (1) {
r.in.req.req1.length = cookie.length;
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 00fc30414d..0a78e9d76d 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1312,7 +1312,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p,
NTSTATUS status;
struct lsa_QuerySecurity r;
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping QuerySecurity test against Samba4\n");
return True;
}
@@ -1551,7 +1551,7 @@ static BOOL test_QueryForestTrustInformation(struct dcerpc_pipe *p,
printf("\nTesting lsaRQueryForestTrustInformation\n");
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping QueryForestTrustInformation against Samba4\n");
return True;
}
@@ -1918,7 +1918,7 @@ static BOOL test_QueryDomainInfoPolicy(struct dcerpc_pipe *p,
NTSTATUS status;
int i;
BOOL ret = True;
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping QueryDomainInformationPolicy test against Samba4\n");
return True;
}
@@ -1954,7 +1954,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
BOOL ret = True;
printf("\nTesting QueryInfoPolicy\n");
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping QueryInfoPolicy against Samba4\n");
return True;
}
@@ -1985,7 +1985,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
}
break;
default:
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
/* Other levels not implemented yet */
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
printf("QueryInfoPolicy failed - %s\n", nt_errstr(status));
@@ -2056,7 +2056,7 @@ static BOOL test_QueryInfoPolicy2(struct dcerpc_pipe *p,
}
break;
default:
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
/* Other levels not implemented yet */
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
printf("QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 75a7d760d9..92f8778df6 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1230,7 +1230,7 @@ static BOOL test_join3(TALLOC_CTX *mem_ctx,
struct cli_credentials *wks_creds;
status = smbcli_full_connection(mem_ctx, &cli,
- lp_parm_string(NULL, "torture", "host"),
+ lp_parm_string(global_loadparm, NULL, "torture", "host"),
"IPC$", NULL, smb_creds, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 2a70a5b71f..af1ff44a43 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -84,7 +84,7 @@ static BOOL test_Shutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_Shutdown r;
- if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
printf("samr_Shutdown disabled - enable dangerous tests to use\n");
return True;
}
@@ -110,7 +110,7 @@ static BOOL test_SetDsrmPassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct lsa_String string;
struct samr_Password hash;
- if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
printf("samr_SetDsrmPassword disabled - enable dangerous tests to use\n");
return True;
}
@@ -159,7 +159,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
s.in.sec_info = 7;
s.in.sdbuf = r.out.sdbuf;
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping SetSecurity test against Samba4\n");
return True;
}
@@ -415,7 +415,7 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
TEST_USERINFO_INT(21, logon_hours.bits[3], 21, logon_hours.bits[3], 4,
SAMR_FIELD_LOGON_HOURS);
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping Set Account Flag tests against Samba4\n");
return ret;
}
@@ -2121,7 +2121,7 @@ static BOOL test_alias_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping MultipleMembers Alias tests against Samba4\n");
return ret;
}
@@ -3180,7 +3180,7 @@ static BOOL test_EnumDomainUsers_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
#define ASYNC_COUNT 100
struct rpc_request *req[ASYNC_COUNT];
- if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+ if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
printf("samr async test disabled - enable dangerous tests to use\n");
return True;
}
@@ -4067,7 +4067,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping SetMemberAttributesOfGroup test against Samba4\n");
} else {
/* this one is quite strange. I am using random inputs in the
@@ -4256,7 +4256,7 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret &= test_QueryDisplayInfo3(p, mem_ctx, &domain_handle);
ret &= test_QueryDisplayInfo_continue(p, mem_ctx, &domain_handle);
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
printf("skipping GetDisplayEnumerationIndex test against Samba4\n");
} else {
ret &= test_GetDisplayEnumerationIndex(p, mem_ctx, &domain_handle);
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index cb70582615..69e18a40cd 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -233,7 +233,7 @@ static bool test_schannel(struct torture_context *tctx,
{
struct test_join *join_ctx;
NTSTATUS status;
- const char *binding = lp_parm_string(NULL, "torture", "binding");
+ const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
struct dcerpc_binding *b;
struct dcerpc_pipe *p = NULL;
struct dcerpc_pipe *p_netlogon = NULL;
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 79a1b87376..b7e3b488c9 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -126,7 +126,7 @@ struct test_join *torture_create_testuser(struct torture_context *torture,
int policy_min_pw_len = 0;
struct test_join *join;
char *random_pw;
- const char *dc_binding = lp_parm_string(NULL, "torture", "dc_binding");
+ const char *dc_binding = lp_parm_string(global_loadparm, NULL, "torture", "dc_binding");
join = talloc(NULL, struct test_join);
if (join == NULL) {
@@ -328,9 +328,9 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
tj->libnet_r = libnet_r;
libnet_ctx->cred = cmdline_credentials;
- libnet_r->in.binding = lp_parm_string(NULL, "torture", "binding");
+ libnet_r->in.binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
if (!libnet_r->in.binding) {
- libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(NULL, "torture", "host"));
+ libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(global_loadparm, NULL, "torture", "host"));
}
libnet_r->in.level = LIBNET_JOINDOMAIN_SPECIFIED;
libnet_r->in.netbios_name = machine_name;
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index c9a5732d2a..c071327419 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -74,9 +74,9 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
DATA_BLOB data;
int i;
- if (lp_parm_bool(NULL, "torture", "dangerous", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
data = data_blob_talloc(tree, NULL, 160000);
- } else if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ } else if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
data = data_blob_talloc(tree, NULL, UINT16_MAX);
} else {
data = data_blob_talloc(tree, NULL, 120000);
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index 86ca56ba55..ab7d4e3110 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -105,7 +105,7 @@ static BOOL torture_smb2_fileinfo(struct smb2_tree *tree)
file_levels[i].dinfo.query_secdesc.in.secinfo_flags = 0x7;
}
if (file_levels[i].level == RAW_FILEINFO_SMB2_ALL_EAS) {
- if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+ if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
continue;
}
file_levels[i].finfo.all_eas.in.continue_flags =
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 946368a2ed..1852d9a984 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -305,8 +305,8 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
BOOL torture_smb2_connection(TALLOC_CTX *mem_ctx, struct smb2_tree **tree)
{
NTSTATUS status;
- const char *host = lp_parm_string(NULL, "torture", "host");
- const char *share = lp_parm_string(NULL, "torture", "share");
+ const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
struct cli_credentials *credentials = cmdline_credentials;
status = smb2_connect(mem_ctx, host, share, credentials, tree,
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 5ef2025d1e..b614e84a5b 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -633,7 +633,7 @@ int main(int argc,char *argv[])
return false;
}
lp_set_cmdline(global_loadparm, "torture:host", binding_struct->host);
- if (lp_parm_string(NULL, "torture", "share") == NULL)
+ if (lp_parm_string(global_loadparm, NULL, "torture", "share") == NULL)
lp_set_cmdline(global_loadparm, "torture:share", "IPC$");
lp_set_cmdline(global_loadparm, "torture:binding", argv_new[1]);
} else {
diff --git a/source4/torture/ui.c b/source4/torture/ui.c
index 4716e93b82..29832fc141 100644
--- a/source4/torture/ui.c
+++ b/source4/torture/ui.c
@@ -363,25 +363,25 @@ BOOL torture_run_test(struct torture_context *context,
int torture_setting_int(struct torture_context *test, const char *name,
int default_value)
{
- return lp_parm_int(NULL, "torture", name, default_value);
+ return lp_parm_int(global_loadparm, NULL, "torture", name, default_value);
}
double torture_setting_double(struct torture_context *test, const char *name,
double default_value)
{
- return lp_parm_double(NULL, "torture", name, default_value);
+ return lp_parm_double(global_loadparm, NULL, "torture", name, default_value);
}
bool torture_setting_bool(struct torture_context *test, const char *name,
bool default_value)
{
- return lp_parm_bool(NULL, "torture", name, default_value);
+ return lp_parm_bool(global_loadparm, NULL, "torture", name, default_value);
}
const char *torture_setting_string(struct torture_context *test, const char *name,
const char *default_value)
{
- const char *ret = lp_parm_string(NULL, "torture", name);
+ const char *ret = lp_parm_string(global_loadparm, NULL, "torture", name);
if (ret == NULL)
return default_value;
diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c
index aea1ee19e0..bc2f4382bb 100644
--- a/source4/torture/unix/whoami.c
+++ b/source4/torture/unix/whoami.c
@@ -72,8 +72,8 @@ static struct smbcli_state *connect_to_server(void *mem_ctx,
NTSTATUS status;
struct smbcli_state *cli;
- const char *host = lp_parm_string(NULL, "torture", "host");
- const char *share = lp_parm_string(NULL, "torture", "share");
+ const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+ const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
status = smbcli_full_connection(mem_ctx, &cli,
host, share, NULL,
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 12d6f82643..10d4831326 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -479,9 +479,9 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
return False;
}
- (*c)->transport->options.use_oplocks = lp_parm_bool(NULL, "torture",
+ (*c)->transport->options.use_oplocks = lp_parm_bool(global_loadparm, NULL, "torture",
"use_oplocks", false);
- (*c)->transport->options.use_level2_oplocks = lp_parm_bool(NULL, "torture",
+ (*c)->transport->options.use_level2_oplocks = lp_parm_bool(global_loadparm, NULL, "torture",
"use_level2_oplocks", false);
return True;
@@ -495,10 +495,10 @@ _PUBLIC_ bool torture_get_conn_index(int conn_index,
int num_unc_names = 0;
const char *p;
- (*host) = talloc_strdup(mem_ctx, lp_parm_string(NULL, "torture", "host"));
- (*share) = talloc_strdup(mem_ctx, lp_parm_string(NULL, "torture", "share"));
+ (*host) = talloc_strdup(mem_ctx, lp_parm_string(global_loadparm, NULL, "torture", "host"));
+ (*share) = talloc_strdup(mem_ctx, lp_parm_string(global_loadparm, NULL, "torture", "share"));
- p = lp_parm_string(NULL, "torture", "unclist");
+ p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
if (!p) {
return True;
}