summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-10-18 14:23:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:24 -0500
commita39f239cb28e4ac6be207d4179bacffce97f1b3e (patch)
treeb9f7e4e7e4c6ad7a5d0107b99c75ee2e9ac2132f
parent19af876bbb7038f5a40cd87eced81661a2fc2ee6 (diff)
downloadsamba-a39f239cb28e4ac6be207d4179bacffce97f1b3e.tar.gz
samba-a39f239cb28e4ac6be207d4179bacffce97f1b3e.tar.bz2
samba-a39f239cb28e4ac6be207d4179bacffce97f1b3e.zip
r19392: Use torture_setting_* rather than lp_parm_* where possible.
(This used to be commit b28860978fe29c5b10abfb8c59d7182864e21dd6)
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/basic/denytest.c6
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/basic/misc.c14
-rw-r--r--source4/torture/ldap/basic.c6
-rw-r--r--source4/torture/ldap/cldap.c2
-rw-r--r--source4/torture/ldap/cldapbench.c2
-rw-r--r--source4/torture/ldap/schema.c2
-rw-r--r--source4/torture/libnet/domain.c2
-rw-r--r--source4/torture/libnet/libnet_domain.c8
-rw-r--r--source4/torture/libnet/libnet_lookup.c8
-rw-r--r--source4/torture/libnet/libnet_rpc.c10
-rw-r--r--source4/torture/libnet/libnet_share.c6
-rw-r--r--source4/torture/libnet/libnet_user.c8
-rw-r--r--source4/torture/libnet/userinfo.c2
-rw-r--r--source4/torture/libnet/userman.c6
-rw-r--r--source4/torture/local/dbspeed.c4
-rw-r--r--source4/torture/local/iconv.c6
-rw-r--r--source4/torture/nbench/nbench.c4
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/raw/samba3hide.c4
-rw-r--r--source4/torture/raw/samba3misc.c6
-rw-r--r--source4/torture/raw/setfileinfo.c2
-rw-r--r--source4/torture/rpc/async_bind.c4
-rw-r--r--source4/torture/rpc/bind.c2
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c3
-rw-r--r--source4/torture/rpc/initshutdown.c2
-rw-r--r--source4/torture/rpc/lsa.c8
-rw-r--r--source4/torture/rpc/mgmt.c2
-rw-r--r--source4/torture/rpc/netlogon.c22
-rw-r--r--source4/torture/rpc/samba3rpc.c39
-rw-r--r--source4/torture/rpc/samlogon.c7
-rw-r--r--source4/torture/rpc/samr.c10
-rw-r--r--source4/torture/rpc/scanner.c2
-rw-r--r--source4/torture/rpc/srvsvc.c2
-rw-r--r--source4/torture/rpc/winreg.c2
-rw-r--r--source4/torture/smb2/connect.c2
-rw-r--r--source4/torture/smb2/getinfo.c2
-rw-r--r--source4/torture/smb2/scan.c4
-rw-r--r--source4/torture/smbtorture.c4
41 files changed, 114 insertions, 119 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 1c2b835aa8..2a7ba85b3d 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1569,7 +1569,7 @@ static BOOL torture_samba3_errorpaths(struct torture_context *tctx)
}
}
- if (!lp_parm_bool(-1, "target", "samba3", False)) {
+ if (!torture_setting_bool(tctx, "samba3", False)) {
goto done;
}
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index cd724b1d4e..3d91058174 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1460,7 +1460,7 @@ BOOL torture_denytest1(struct torture_context *tctx,
}
}
- if (lp_parm_bool(-1, "torture", "showall", False) ||
+ if (torture_setting_bool(tctx, "showall", False) ||
res != denytable1[i].result) {
int64_t tdif;
GetTimeOfDay(&tv);
@@ -1547,7 +1547,7 @@ BOOL torture_denytest2(struct torture_context *tctx,
}
}
- if (lp_parm_bool(-1, "torture", "showall", False) ||
+ if (torture_setting_bool(tctx, "showall", False) ||
res != denytable2[i].result) {
int64_t tdif;
GetTimeOfDay(&tv);
@@ -1852,7 +1852,7 @@ static BOOL torture_ntdenytest(struct torture_context *tctx,
GetTimeOfDay(&tv);
tdif = usec_time_diff(&tv, &tv_start);
tdif /= 1000;
- if (lp_parm_bool(-1, "torture", "showall", False) ||
+ if (torture_setting_bool(tctx, "showall", False) ||
!NT_STATUS_EQUAL(status2, status2_p) ||
res != res2) {
torture_comment(tctx, "\n%-20s %-70s\n%-20s %-70s %4s %4s %s/%s\n",
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 348f59d057..5bc7d997ed 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -156,7 +156,7 @@ BOOL torture_disconnect(struct torture_context *torture)
return False;
}
- if (lp_parm_bool(-1, "target", "samba3", False)) {
+ if (torture_setting_bool(torture, "samba3", False)) {
/*
* In Samba3 it might happen that the old smbd from
* test_disconnect_lock is not scheduled before the
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index c00372b805..0059574939 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -419,13 +419,13 @@ static int init_benchrw_params(struct torture_context *tctx, struct params *lpar
char **unc_list = NULL;
int num_unc_names = 0, conn_index=0, empty_lines=0;
const char *p;
- lpar->retry = lp_parm_int(-1, "torture", "retry",3);
- lpar->blocksize = lp_parm_int(-1, "torture", "blocksize",65535);
- lpar->writeblocks = lp_parm_int(-1, "torture", "writeblocks",15);
- lpar->writeratio = lp_parm_int(-1, "torture", "writeratio",5);
+ lpar->retry = torture_setting_int(tctx, "retry",3);
+ lpar->blocksize = torture_setting_int(tctx, "blocksize",65535);
+ lpar->writeblocks = torture_setting_int(tctx, "writeblocks",15);
+ lpar->writeratio = torture_setting_int(tctx, "writeratio",5);
lpar->workgroup = lp_workgroup();
- p = lp_parm_string(-1, "torture", "unclist");
+ p = torture_setting_string(tctx, "unclist", NULL);
if (p) {
char *h, *s;
unc_list = file_lines_load(p, &num_unc_names, NULL);
@@ -455,8 +455,8 @@ static int init_benchrw_params(struct torture_context *tctx, struct params *lpar
}else{
lpar->unc = talloc_array(tctx, struct unclist *, 1);
lpar->unc[0] = talloc(tctx,struct unclist);
- lpar->unc[0]->host = lp_parm_string(-1, "torture", "host");
- lpar->unc[0]->share = lp_parm_string(-1, "torture", "share");
+ lpar->unc[0]->host = torture_setting_string(tctx, "host", NULL);
+ lpar->unc[0]->share = torture_setting_string(tctx, "share", NULL);
return 1;
}
}
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index 7b041e9255..ba7130677c 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -194,9 +194,9 @@ BOOL torture_ldap_basic(struct torture_context *torture)
struct ldap_connection *conn;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- const char *host = lp_parm_string(-1, "torture", "host");
- const char *userdn = lp_parm_string(-1, "torture", "ldap_userdn");
- const char *secret = lp_parm_string(-1, "torture", "ldap_secret");
+ const char *host = torture_setting_string(torture, "host", NULL);
+ const char *userdn = torture_setting_string(torture, "ldap_userdn", NULL);
+ const char *secret = torture_setting_string(torture, "ldap_secret", NULL);
char *url;
char *basedn;
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 45d758547d..321feb639f 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -256,7 +256,7 @@ BOOL torture_cldap(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- const char *host = lp_parm_string(-1, "torture", "host");
+ const char *host = torture_setting_string(torture, "host", NULL);
mem_ctx = talloc_init("torture_cldap");
diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c
index c49e4eb687..99ab69cee4 100644
--- a/source4/torture/ldap/cldapbench.c
+++ b/source4/torture/ldap/cldapbench.c
@@ -110,7 +110,7 @@ BOOL torture_bench_cldap(struct torture_context *torture)
NTSTATUS status;
BOOL ret = True;
- make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
+ make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
/* do an initial name resolution to find its IP */
status = resolve_name(&name, mem_ctx, &address, event_context_find(mem_ctx));
diff --git a/source4/torture/ldap/schema.c b/source4/torture/ldap/schema.c
index df5f8ca5ce..bc8f1e38ce 100644
--- a/source4/torture/ldap/schema.c
+++ b/source4/torture/ldap/schema.c
@@ -487,7 +487,7 @@ BOOL torture_ldap_schema(struct torture_context *torture)
struct ldb_context *ldb;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- const char *host = lp_parm_string(-1, "torture", "host");
+ const char *host = torture_setting_string(torture, "host", NULL);
char *url;
struct test_rootDSE rootDSE;
struct dsdb_schema *schema = NULL;
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 991fe8e51a..c85e6006fe 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -82,7 +82,7 @@ BOOL torture_domainopen(struct torture_context *torture)
struct lsa_String name;
mem_ctx = talloc_init("test_domain_open");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
evt_ctx = event_context_find(torture);
net_ctx = libnet_context_init(evt_ctx);
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c
index 24431de54a..8bf175212e 100644
--- a/source4/torture/libnet/libnet_domain.c
+++ b/source4/torture/libnet/libnet_domain.c
@@ -133,7 +133,7 @@ BOOL torture_domain_open_lsa(struct torture_context *torture)
struct policy_handle h;
const char *bindstr;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -190,7 +190,7 @@ BOOL torture_domain_close_lsa(struct torture_context *torture)
struct dcerpc_pipe *p;
struct libnet_DomainClose r;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -263,7 +263,7 @@ BOOL torture_domain_open_samr(struct torture_context *torture)
BOOL ret = True;
mem_ctx = talloc_init("test_domainopen_lsa");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
ctx = libnet_context_init(evt_ctx);
ctx->cred = cmdline_credentials;
@@ -322,7 +322,7 @@ BOOL torture_domain_close_samr(struct torture_context *torture)
struct dcerpc_pipe *p;
struct libnet_DomainClose r;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index eb03eb5eca..7a414b3297 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -43,9 +43,9 @@ BOOL torture_lookup(struct torture_context *torture)
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
- lookup.in.hostname = lp_parm_string(-1, "torture", "host");
+ lookup.in.hostname = torture_setting_string(torture, "host", NULL);
if (lookup.in.hostname == NULL) {
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(mem_ctx, bindstr, &bind);
if (NT_STATUS_IS_OK(status)) {
lookup.in.hostname = bind->host;
@@ -89,9 +89,9 @@ BOOL torture_lookup_host(struct torture_context *torture)
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
- lookup.in.hostname = lp_parm_string(-1, "torture", "host");
+ lookup.in.hostname = torture_setting_string(torture, "host", NULL);
if (lookup.in.hostname == NULL) {
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(mem_ctx, bindstr, &bind);
if (NT_STATUS_IS_OK(status)) {
lookup.in.hostname = bind->host;
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 30c1438e38..19802df72d 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -139,7 +139,7 @@ BOOL torture_rpc_connect_srv(struct torture_context *torture)
struct dcerpc_binding *binding;
const char *bindstr;;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -157,7 +157,7 @@ BOOL torture_rpc_connect_pdc(struct torture_context *torture)
struct dcerpc_binding *binding;
const char *bindstr;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -175,7 +175,7 @@ BOOL torture_rpc_connect_dc(struct torture_context *torture)
struct dcerpc_binding *binding;
const char *bindstr;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -193,7 +193,7 @@ BOOL torture_rpc_connect_dc_info(struct torture_context *torture)
struct dcerpc_binding *binding;
const char *bindstr;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
@@ -211,7 +211,7 @@ BOOL torture_rpc_connect_binding(struct torture_context *torture)
struct dcerpc_binding *binding;
const char *bindstr;
- bindstr = lp_parm_string(-1, "torture", "binding");
+ bindstr = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(torture, bindstr, &binding);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to parse binding string\n");
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index 884c0b31c8..07505adebb 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -127,7 +127,7 @@ BOOL torture_listshares(struct torture_context *torture)
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_init("test_listshares");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(mem_ctx, binding, &bind);
if (!NT_STATUS_IS_OK(status)) {
printf("Error while parsing the binding string\n");
@@ -211,8 +211,8 @@ BOOL torture_delshare(struct torture_context *torture)
struct libnet_DelShare share;
mem_ctx = talloc_init("test_listshares");
- host = lp_parm_string(-1, "torture", "host");
- binding = lp_parm_string(-1, "torture", "binding");
+ host = torture_setting_string(torture, "host", NULL);
+ binding = torture_setting_string(torture, "binding", NULL);
status = dcerpc_parse_binding(mem_ctx, binding, &bind);
if (!NT_STATUS_IS_OK(status)) {
printf("Error while parsing the binding string\n");
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index db8dfac6bd..606e0212e1 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -221,7 +221,7 @@ BOOL torture_createuser(struct torture_context *torture)
BOOL ret = True;
mem_ctx = talloc_init("test_createuser");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
@@ -269,7 +269,7 @@ BOOL torture_deleteuser(struct torture_context *torture)
BOOL ret = True;
prep_mem_ctx = talloc_init("prepare test_deleteuser");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
@@ -459,7 +459,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
BOOL ret = True;
prep_mem_ctx = talloc_init("prepare test_deleteuser");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
@@ -599,7 +599,7 @@ BOOL torture_userinfo_api(struct torture_context *torture)
struct libnet_UserInfo req;
prep_mem_ctx = talloc_init("prepare torture user info");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c
index 4a92f9689f..f69f5b4cee 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -313,7 +313,7 @@ BOOL torture_userinfo(struct torture_context *torture)
uint32_t rid;
mem_ctx = talloc_init("test_userinfo");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
status = torture_rpc_connection(mem_ctx,
&p,
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index 3176b891bf..431443806d 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -488,7 +488,7 @@ BOOL torture_useradd(struct torture_context *torture)
BOOL ret = True;
mem_ctx = talloc_init("test_useradd");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
status = torture_rpc_connection(mem_ctx,
&p,
@@ -547,7 +547,7 @@ BOOL torture_userdel(struct torture_context *torture)
BOOL ret = True;
mem_ctx = talloc_init("test_userdel");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
status = torture_rpc_connection(mem_ctx,
&p,
@@ -592,7 +592,7 @@ BOOL torture_usermod(struct torture_context *torture)
BOOL ret = True;
mem_ctx = talloc_init("test_userdel");
- binding = lp_parm_string(-1, "torture", "binding");
+ binding = torture_setting_string(torture, "binding", NULL);
status = torture_rpc_connection(mem_ctx,
&p,
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index 4eac7c9499..b6b734eef2 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -52,7 +52,7 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data)
{
struct timeval tv;
struct tdb_wrap *tdbw;
- int timelimit = lp_parm_int(-1, "torture", "timelimit", 10);
+ int timelimit = torture_setting_int(torture, "timelimit", 10);
int i, count;
TALLOC_CTX *tmp_ctx = talloc_new(torture);
@@ -158,7 +158,7 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data)
{
struct timeval tv;
struct ldb_context *ldb;
- int timelimit = lp_parm_int(-1, "torture", "timelimit", 10);
+ int timelimit = torture_setting_int(torture, "timelimit", 10);
int i, count;
TALLOC_CTX *tmp_ctx = talloc_new(torture);
struct ldb_ldif *ldif;
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 28834a6680..e41e40dc8d 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -304,8 +304,8 @@ static bool test_first_1m(struct torture_context *tctx)
}
if (codepoint % 1000 == 0) {
- if (!lp_parm_bool(-1, "torture", "progress", True)) {
- printf("codepoint=%u \r", codepoint);
+ if (!torture_setting_bool(tctx, "progress", True)) {
+ torture_comment(tctx, "codepoint=%u \r", codepoint);
}
}
@@ -324,7 +324,7 @@ static bool test_random_5m(struct torture_context *tctx)
unsigned int c;
if (i % 1000 == 0) {
- if (!lp_parm_bool(-1, "torture", "progress", True)) {
+ if (!torture_setting_bool(tctx, "progress", true)) {
torture_comment(tctx, "i=%u \r", i);
}
}
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index fe3c905b46..a9ff8e5507 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -175,14 +175,14 @@ BOOL torture_nbench(struct torture_context *torture)
struct smbcli_state *cli;
const char *p;
- p = lp_parm_string(-1, "torture", "timelimit");
+ p = torture_setting_string(torture, "timelimit", NULL);
if (p && *p) {
timelimit = atoi(p);
}
warmup = timelimit / 20;
- loadfile = lp_parm_string(-1, "torture", "loadfile");
+ loadfile = torture_setting_string(torture, "loadfile", NULL);
if (!loadfile || !*loadfile) {
loadfile = "client.txt";
}
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 850bb4046f..98744e0ec2 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -769,7 +769,7 @@ BOOL torture_bench_oplock(struct torture_context *torture)
TALLOC_CTX *mem_ctx = talloc_new(torture);
extern int torture_nprocs;
int i, count=0;
- int timelimit = lp_parm_int(-1, "torture", "timelimit", 10);
+ int timelimit = torture_setting_int(torture, "timelimit", 10);
union smb_open io;
struct timeval tv;
struct event_context *ev = event_context_find(mem_ctx);
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index ef99eb0103..bb27ba71e5 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -475,7 +475,7 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
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(-1, "target", "samba3", False)) {
+ if (lp_parm_bool(-1, "torture", "samba3", False)) {
printf("SAMBA3: ignore wrong nread[%d] should be [%d]\n",
io.readx.out.nread, 0);
} else {
diff --git a/source4/torture/raw/samba3hide.c b/source4/torture/raw/samba3hide.c
index da23cfb1f1..eed38eb772 100644
--- a/source4/torture/raw/samba3hide.c
+++ b/source4/torture/raw/samba3hide.c
@@ -136,8 +136,8 @@ BOOL torture_samba3_hide(struct torture_context *torture)
struct smbcli_tree *hideunwrite;
if (!torture_open_connection_share(
- torture, &cli, lp_parm_string(-1, "torture", "host"),
- lp_parm_string(-1, "torture", "share"), NULL)) {
+ torture, &cli, torture_setting_string(torture, "host", NULL),
+ torture_setting_string(torture, "share", NULL), NULL)) {
d_printf("torture_open_connection_share failed\n");
return False;
}
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 0cbc7912ed..0b196b1587 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -53,8 +53,8 @@ BOOL torture_samba3_checkfsp(struct torture_context *torture)
}
if (!torture_open_connection_share(
- torture, &cli, lp_parm_string(-1, "torture", "host"),
- lp_parm_string(-1, "torture", "share"), NULL)) {
+ torture, &cli, torture_setting_string(torture, "host", NULL),
+ torture_setting_string(torture, "share", NULL), NULL)) {
d_printf("torture_open_connection_share failed\n");
ret = False;
goto done;
@@ -63,7 +63,7 @@ BOOL torture_samba3_checkfsp(struct torture_context *torture)
smbcli_deltree(cli->tree, dirname);
status = torture_second_tcon(torture, cli->session,
- lp_parm_string(-1, "torture", "share"),
+ torture_setting_string(torture, "share", NULL),
&tree2);
CHECK_STATUS(status, NT_STATUS_OK);
if (!NT_STATUS_IS_OK(status))
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 1bccb30094..8ad9189734 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -546,7 +546,7 @@ BOOL torture_raw_sfileinfo_bug(struct torture_context *torture)
NTSTATUS status;
int fnum;
- if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
+ if (!torture_setting_bool(torture, "dangerous", False)) {
printf("torture_raw_sfileinfo_bug disabled - enable dangerous tests to use\n");
return True;
}
diff --git a/source4/torture/rpc/async_bind.c b/source4/torture/rpc/async_bind.c
index 952baacbf4..70333845ff 100644
--- a/source4/torture/rpc/async_bind.c
+++ b/source4/torture/rpc/async_bind.c
@@ -50,12 +50,12 @@ BOOL torture_async_bind(struct torture_context *torture)
struct dcerpc_pipe **pipe;
const struct dcerpc_interface_table **table;
- if (!lp_parm_bool(-1, "torture", "async", False)) {
+ if (!torture_setting_bool(torture, "async", False)) {
printf("async bind test disabled - enable async tests to use\n");
return True;
}
- binding_string = lp_parm_string(-1, "torture", "binding");
+ binding_string = torture_setting_string(torture, "binding", NULL);
/* talloc context */
mem_ctx = talloc_init("torture_async_bind");
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index 956609e44e..2ba886a38d 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -46,7 +46,7 @@ BOOL torture_multi_bind(struct torture_context *torture)
{
struct dcerpc_pipe *p;
struct dcerpc_binding *binding;
- const char *binding_string = lp_parm_string(-1, "torture", "binding");
+ const char *binding_string = torture_setting_string(torture, "binding", NULL);
TALLOC_CTX *mem_ctx;
NTSTATUS status;
BOOL ret;
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index fb63212f27..c38045621a 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -797,7 +797,8 @@ BOOL torture_rpc_drsuapi_cracknames(struct torture_context *torture)
ret &= test_DsBind(p, mem_ctx, &priv);
- ret &= test_DsCrackNames(p, mem_ctx, &priv, lp_parm_string(-1, "torture", "host"));
+ ret &= test_DsCrackNames(p, mem_ctx, &priv,
+ torture_setting_string(torture, "host", NULL));
ret &= test_DsUnbind(p, mem_ctx, &priv);
diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c
index 17589040cc..7602d1f83a 100644
--- a/source4/torture/rpc/initshutdown.c
+++ b/source4/torture/rpc/initshutdown.c
@@ -129,7 +129,7 @@ BOOL torture_rpc_initshutdown(struct torture_context *torture)
return False;
}
- if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
+ if (!torture_setting_bool(torture, "dangerous", False)) {
printf("initshutdown tests disabled - enable dangerous tests to use\n");
} else {
ret &= test_Init(p, mem_ctx, "spottyfood", 30);
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 575426a409..36080a25e1 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1223,7 +1223,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p,
NTSTATUS status;
struct lsa_QuerySecurity r;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping QuerySecurity test against Samba4\n");
return True;
}
@@ -1767,7 +1767,7 @@ static BOOL test_QueryDomainInfoPolicy(struct dcerpc_pipe *p,
NTSTATUS status;
int i;
BOOL ret = True;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping QueryDomainInformationPolicy test against Samba4\n");
return True;
}
@@ -1803,7 +1803,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
BOOL ret = True;
printf("\nTesting QueryInfoPolicy\n");
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping QueryInfoPolicy against Samba4\n");
return True;
}
@@ -1841,7 +1841,7 @@ static BOOL test_QueryInfoPolicy2(struct dcerpc_pipe *p,
int i;
BOOL ret = True;
printf("\nTesting QueryInfoPolicy2\n");
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping QueryInfoPolicy2 against Samba4\n");
return True;
}
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 51dbdd5b16..0da7fcb8d3 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -180,7 +180,7 @@ BOOL torture_rpc_mgmt(struct torture_context *torture)
struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx, *loop_ctx;
BOOL ret = True;
- const char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = torture_setting_string(torture, "binding", NULL);
const struct dcerpc_interface_list *l;
struct dcerpc_binding *b;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 92f06c4396..352faa2c14 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -41,7 +41,7 @@ static BOOL test_LogonUasLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_LogonUasLogon r;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping LogonUasLogon test against Samba4\n");
return True;
}
@@ -67,7 +67,7 @@ static BOOL test_LogonUasLogoff(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_LogonUasLogoff r;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping LogonUasLogoff test against Samba4\n");
return True;
}
@@ -629,7 +629,7 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping DatabaseSync test against Samba4\n");
return True;
}
@@ -695,7 +695,7 @@ static BOOL test_DatabaseDeltas(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping DatabaseDeltas test against Samba4\n");
return True;
}
@@ -829,7 +829,7 @@ static BOOL test_GetDcName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
struct netr_GetDcName r;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping GetDCName test against Samba4\n");
return True;
}
@@ -860,7 +860,7 @@ static BOOL test_LogonControl(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping LogonControl test against Samba4\n");
return True;
}
@@ -892,7 +892,7 @@ static BOOL test_GetAnyDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_GetAnyDCName r;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping GetAnyDCName test against Samba4\n");
return True;
}
@@ -926,7 +926,7 @@ static BOOL test_LogonControl2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping LogonControl2 test against Samba4\n");
return True;
}
@@ -1012,7 +1012,7 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping DatabaseSync2 test against Samba4\n");
return True;
}
@@ -1068,7 +1068,7 @@ static BOOL test_LogonControl2Ex(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping DatabaseSync2 test against Samba4\n");
return True;
}
@@ -1174,7 +1174,7 @@ static BOOL test_netr_DsRGetSiteName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct netr_DsRGetSiteName r;
BOOL ret = True;
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping DsRGetSiteName test against Samba4\n");
return True;
}
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 76df1a72c7..64a5c46e33 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -93,7 +93,7 @@ BOOL torture_bind_authcontext(struct torture_context *torture)
}
status = smbcli_full_connection(mem_ctx, &cli,
- lp_parm_string(-1, "torture", "host"),
+ torture_setting_string(torture, "host", NULL),
"IPC$", NULL, cmdline_credentials,
NULL);
if (!NT_STATUS_IS_OK(status)) {
@@ -298,7 +298,7 @@ BOOL torture_bind_samba3(struct torture_context *torture)
}
status = smbcli_full_connection(mem_ctx, &cli,
- lp_parm_string(-1, "torture", "host"),
+ torture_setting_string(torture, "host", NULL),
"IPC$", NULL, cmdline_credentials,
NULL);
if (!NT_STATUS_IS_OK(status)) {
@@ -1125,7 +1125,7 @@ BOOL torture_netlogon_samba3(struct torture_context *torture)
const char *wks_name;
int i;
- wks_name = lp_parm_string(-1, "torture", "wksname");
+ wks_name = torture_setting_string(torture, "wksname", NULL);
if (wks_name == NULL) {
wks_name = get_myname();
}
@@ -1143,7 +1143,7 @@ BOOL torture_netlogon_samba3(struct torture_context *torture)
}
status = smbcli_full_connection(mem_ctx, &cli,
- lp_parm_string(-1, "torture", "host"),
+ torture_setting_string(torture, "host", NULL),
"IPC$", NULL, anon_creds, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("smbcli_full_connection failed: %s\n",
@@ -1285,10 +1285,7 @@ BOOL torture_samba3_sessionkey(struct torture_context *torture)
struct cli_credentials *anon_creds;
const char *wks_name;
- wks_name = lp_parm_string(-1, "torture", "wksname");
- if (wks_name == NULL) {
- wks_name = get_myname();
- }
+ wks_name = torture_setting_string(torture, "wksname", get_myname());
mem_ctx = talloc_init("torture_samba3_sessionkey");
@@ -1304,7 +1301,7 @@ BOOL torture_samba3_sessionkey(struct torture_context *torture)
ret = True;
- if (!lp_parm_bool(-1, "target", "samba3", False)) {
+ if (!torture_setting_bool(torture, "samba3", False)) {
/* Samba3 in the build farm right now does this happily. Need
* to fix :-) */
@@ -1590,7 +1587,7 @@ BOOL torture_samba3_rpc_getusername(struct torture_context *torture)
}
status = smbcli_full_connection(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL, cmdline_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) smbcli_full_connection failed: %s\n",
@@ -1614,7 +1611,7 @@ BOOL torture_samba3_rpc_getusername(struct torture_context *torture)
}
status = smbcli_full_connection(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL, anon_creds, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) anon smbcli_full_connection failed: %s\n",
@@ -1827,7 +1824,7 @@ BOOL torture_samba3_rpc_srvsvc(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
talloc_free(mem_ctx);
return False;
@@ -2066,7 +2063,7 @@ BOOL torture_samba3_rpc_sharesec(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2079,20 +2076,20 @@ BOOL torture_samba3_rpc_sharesec(struct torture_context *torture)
return False;
}
- sd = get_sharesec(mem_ctx, cli->session, lp_parm_string(-1, "torture",
- "share"));
+ sd = get_sharesec(mem_ctx, cli->session, torture_setting_string(torture,
+ "share", NULL));
ret &= try_tcon(mem_ctx, sd, cli->session,
- lp_parm_string(-1, "torture", "share"),
+ torture_setting_string(torture, "share", NULL),
user_sid, 0, NT_STATUS_ACCESS_DENIED, NT_STATUS_OK);
ret &= try_tcon(mem_ctx, sd, cli->session,
- lp_parm_string(-1, "torture", "share"),
+ torture_setting_string(torture, "share", NULL),
user_sid, SEC_FILE_READ_DATA, NT_STATUS_OK,
NT_STATUS_NETWORK_ACCESS_DENIED);
ret &= try_tcon(mem_ctx, sd, cli->session,
- lp_parm_string(-1, "torture", "share"),
+ torture_setting_string(torture, "share", NULL),
user_sid, SEC_FILE_ALL, NT_STATUS_OK, NT_STATUS_OK);
talloc_free(mem_ctx);
@@ -2114,7 +2111,7 @@ BOOL torture_samba3_rpc_lsa(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2392,7 +2389,7 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2578,7 +2575,7 @@ BOOL torture_samba3_rpc_wkssvc(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, lp_parm_string(-1, "torture", "host"),
+ mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 28f6424ad3..be0ea08cbd 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1482,7 +1482,7 @@ BOOL torture_rpc_samlogon(struct torture_context *torture)
char *user_password;
const char *old_user_password;
char *test_machine_account;
- const char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = torture_setting_string(torture, "binding", NULL);
const char *userdomain;
int i;
int ci;
@@ -1508,10 +1508,7 @@ BOOL torture_rpc_samlogon(struct torture_context *torture)
return False;
}
- userdomain = lp_parm_string(-1, "torture", "userdomain");
- if (!userdomain) {
- userdomain = lp_workgroup();
- }
+ userdomain = torture_setting_string(torture, "userdomain", lp_workgroup());
user_ctx = torture_create_testuser(TEST_USER_NAME,
userdomain,
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 8b37af762d..387e479661 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -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(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping SetSecurity test against Samba4\n");
return True;
}
@@ -383,7 +383,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(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping Set Account Flag tests against Samba4\n");
return ret;
}
@@ -1662,7 +1662,7 @@ static BOOL test_alias_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping MultipleMembers Alias tests against Samba4\n");
return ret;
}
@@ -3315,7 +3315,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- if (lp_parm_bool(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
printf("skipping SetMemberAttributesOfGroup test against Samba4\n");
} else {
/* this one is quite strange. I am using random inputs in the
@@ -3503,7 +3503,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(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "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/scanner.c b/source4/torture/rpc/scanner.c
index 89c0cb485e..9c0c973712 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -143,7 +143,7 @@ BOOL torture_rpc_scanner(struct torture_context *torture)
TALLOC_CTX *mem_ctx, *loop_ctx;
BOOL ret = True;
const struct dcerpc_interface_list *l;
- const char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = torture_setting_string(torture, "binding", NULL);
struct dcerpc_binding *b;
mem_ctx = talloc_init("torture_rpc_scanner");
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index acc705ca1e..f024d1d2ab 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -1092,7 +1092,7 @@ BOOL torture_rpc_srvsvc(struct torture_context *torture)
struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- const char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = torture_setting_string(torture, "binding", NULL);
struct cli_credentials *anon_credentials;
mem_ctx = talloc_init("torture_rpc_srvsvc");
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 370a023dd5..2516c35276 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -826,7 +826,7 @@ BOOL torture_rpc_winreg(struct torture_context *torture)
return False;
}
- if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
+ if (!torture_setting_bool(torture, "dangerous", False)) {
printf("winreg_InitiateShutdown disabled - enable dangerous tests to use\n");
} else {
ret &= test_InitiateSystemShutdown(p, mem_ctx, "spottyfood", 30);
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index 9f36e4d707..46aabc0e9a 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -76,7 +76,7 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
if (lp_parm_bool(-1, "torture", "dangerous", False)) {
data = data_blob_talloc(tree, NULL, 160000);
- } else if (lp_parm_bool(-1, "target", "samba4", False)) {
+ } else if (lp_parm_bool(-1, "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 dfabb08225..e90fd8c1c5 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -104,7 +104,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(-1, "target", "samba4", False)) {
+ if (lp_parm_bool(-1, "torture", "samba4", False)) {
continue;
}
file_levels[i].finfo.all_eas.in.continue_flags =
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index 6191499cac..75f62ffa74 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -202,8 +202,8 @@ BOOL torture_smb2_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
- const char *host = lp_parm_string(-1, "torture", "host");
- const char *share = lp_parm_string(-1, "torture", "share");
+ const char *host = torture_setting_string(torture, "host", NULL);
+ const char *share = torture_setting_string(torture, "share", NULL);
struct cli_credentials *credentials = cmdline_credentials;
NTSTATUS status;
int opcode;
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index ce05989327..cd640f87d3 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -516,10 +516,10 @@ const static struct torture_ui_ops quiet_ui_ops = {
}
if (strcmp(target, "samba3") == 0) {
- lp_set_cmdline("target:samba3", "true");
+ lp_set_cmdline("torture:samba3", "true");
lp_set_cmdline("torture:knownfail", "samba3-knownfail");
} else if (strcmp(target, "samba4") == 0) {
- lp_set_cmdline("target:samba4", "true");
+ lp_set_cmdline("torture:samba4", "true");
lp_set_cmdline("torture:knownfail", "samba4-knownfail");
}