summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/base.c4
-rw-r--r--source4/torture/basic/misc.c2
-rw-r--r--source4/torture/basic/secleak.c4
-rw-r--r--source4/torture/gentest.c3
-rw-r--r--source4/torture/libnet/domain.c2
-rw-r--r--source4/torture/libnet/groupinfo.c2
-rw-r--r--source4/torture/libnet/groupman.c2
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c2
-rw-r--r--source4/torture/libnet/libnet_domain.c8
-rw-r--r--source4/torture/libnet/libnet_group.c2
-rw-r--r--source4/torture/libnet/libnet_lookup.c4
-rw-r--r--source4/torture/libnet/libnet_rpc.c6
-rw-r--r--source4/torture/libnet/libnet_user.c18
-rw-r--r--source4/torture/libnet/userinfo.c2
-rw-r--r--source4/torture/libnet/userman.c6
-rw-r--r--source4/torture/locktest.c3
-rw-r--r--source4/torture/locktest2.c2
-rw-r--r--source4/torture/masktest.c3
-rw-r--r--source4/torture/nbt/dgram.c14
-rw-r--r--source4/torture/nbt/winsreplication.c7
-rw-r--r--source4/torture/raw/composite.c4
-rw-r--r--source4/torture/raw/context.c20
-rw-r--r--source4/torture/raw/lock.c2
-rw-r--r--source4/torture/raw/lockbench.c2
-rw-r--r--source4/torture/raw/openbench.c2
-rw-r--r--source4/torture/raw/samba3misc.c2
-rw-r--r--source4/torture/rpc/dssync.c2
-rw-r--r--source4/torture/rpc/netlogon.c26
-rw-r--r--source4/torture/rpc/samba3rpc.c10
-rw-r--r--source4/torture/rpc/samlogon.c8
-rw-r--r--source4/torture/rpc/samr_accessmask.c12
-rw-r--r--source4/torture/rpc/samsync.c14
-rw-r--r--source4/torture/rpc/schannel.c6
-rw-r--r--source4/torture/rpc/testjoin.c7
-rw-r--r--source4/torture/util_smb.c2
-rw-r--r--source4/torture/winbind/struct_based.c6
36 files changed, 114 insertions, 107 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 7c9339dedc..303cbee62f 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -41,7 +41,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
struct smbcli_state *cli;
const char *host = torture_setting_string(tctx, "host", NULL);
- make_nbt_name_client(&calling, lp_netbios_name());
+ make_nbt_name_client(&calling, lp_netbios_name(global_loadparm));
nbt_choose_called_name(NULL, &called, host, NBT_NAME_SERVER);
@@ -1443,7 +1443,7 @@ static BOOL torture_samba3_errorpaths(struct torture_context *tctx)
return False;
}
- nt_status_support = lp_nt_status_support();
+ nt_status_support = lp_nt_status_support(global_loadparm);
if (!lp_set_cmdline(global_loadparm, "nt status support", "yes")) {
torture_comment(tctx, "Could not set 'nt status support = yes'\n");
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index d493aa819e..19eef87f6f 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -442,7 +442,7 @@ static int init_benchrw_params(struct torture_context *tctx,
lpar->writeratio = torture_setting_int(tctx, "writeratio",5);
lpar->num_parallel_requests = torture_setting_int(
tctx, "parallel_requests", 5);
- lpar->workgroup = lp_workgroup();
+ lpar->workgroup = lp_workgroup(global_loadparm);
p = torture_setting_string(tctx, "unclist", NULL);
if (p) {
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 030a4f5f67..75d3117967 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -38,10 +38,10 @@ static BOOL try_failed_login(struct smbcli_state *cli)
session = smbcli_session_init(cli->transport, cli, False);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cli_credentials_init(session);
- cli_credentials_set_conf(setup.in.credentials);
+ cli_credentials_set_conf(setup.in.credentials, global_loadparm);
cli_credentials_set_domain(setup.in.credentials, "INVALID-DOMAIN", CRED_SPECIFIED);
cli_credentials_set_username(setup.in.credentials, "INVALID-USERNAME", CRED_SPECIFIED);
cli_credentials_set_password(setup.in.credentials, "INVALID-PASSWORD", CRED_SPECIFIED);
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 23c52bb446..a03f8a0825 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -27,6 +27,7 @@
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "param/param.h"
+#include "dynconfig.h"
#define NSERVERS 2
#define NINSTANCES 2
@@ -2195,7 +2196,7 @@ static BOOL split_unc_name(const char *unc, char **server, char **share)
argc -= NSERVERS;
argv += NSERVERS;
- lp_load();
+ lp_load(dyn_CONFIGFILE);
servers[0].credentials = cli_credentials_init(talloc_autofree_context());
servers[1].credentials = cli_credentials_init(talloc_autofree_context());
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index cfd3c10968..329c8a1d23 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -93,7 +93,7 @@ BOOL torture_domainopen(struct torture_context *torture)
return False;
}
- name.string = lp_workgroup();
+ name.string = lp_workgroup(global_loadparm);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupinfo.c b/source4/torture/libnet/groupinfo.c
index 3efd3f2e85..31b49ef70e 100644
--- a/source4/torture/libnet/groupinfo.c
+++ b/source4/torture/libnet/groupinfo.c
@@ -91,7 +91,7 @@ BOOL torture_groupinfo(struct torture_context *torture)
return False;
}
- name.string = lp_workgroup();
+ name.string = lp_workgroup(global_loadparm);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupman.c b/source4/torture/libnet/groupman.c
index 0db89f4960..a812f59aea 100644
--- a/source4/torture/libnet/groupman.c
+++ b/source4/torture/libnet/groupman.c
@@ -71,7 +71,7 @@ BOOL torture_groupadd(struct torture_context *torture)
return False;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, mem_ctx, &h, &domain_name, &sid)) {
ret = False;
goto done;
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index c4b1a57ff1..5338d480bc 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -163,7 +163,7 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
DEBUG(0,("Pathes under PRIVATEDIR[%s]\n"
"SAMDB[%s] SECRETS[%s] KEYTAB[%s]\n",
- lp_private_dir(),
+ lp_private_dir(global_loadparm),
s->path.samdb_ldb,
s->path.secrets_ldb,
s->path.secrets_keytab));
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c
index 1bcbfbbe4f..a2c0967faa 100644
--- a/source4/torture/libnet/libnet_domain.c
+++ b/source4/torture/libnet/libnet_domain.c
@@ -134,7 +134,7 @@ bool torture_domain_open_lsa(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup();
+ domain_name = lp_workgroup(global_loadparm);
ctx = libnet_context_init(NULL);
if (ctx == NULL) {
@@ -208,7 +208,7 @@ BOOL torture_domain_close_lsa(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain_lsa(p, torture, &h, &domain_name, &access_mask)) {
d_printf("failed to open domain on lsa service\n");
@@ -261,7 +261,7 @@ BOOL torture_domain_open_samr(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup();
+ domain_name = lp_workgroup(global_loadparm);
/*
* Testing synchronous version
@@ -338,7 +338,7 @@ BOOL torture_domain_close_samr(struct torture_context *torture)
goto done;
}
- domain_name.string = talloc_strdup(mem_ctx, lp_workgroup());
+ domain_name.string = talloc_strdup(mem_ctx, lp_workgroup(global_loadparm));
if (!test_opendomain_samr(p, torture, &h, &domain_name, &access_mask, &sid)) {
d_printf("failed to open domain on samr service\n");
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c
index bc51c4242a..7089bd83fc 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -226,7 +226,7 @@ BOOL torture_groupinfo_api(struct torture_context *torture)
return False;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, prep_mem_ctx, &h, &domain_name)) {
ret = False;
goto done;
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index a98781bc17..0d4389c54a 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -138,7 +138,7 @@ BOOL torture_lookup_pdc(struct torture_context *torture)
goto done;
}
- lookup->in.domain_name = lp_workgroup();
+ lookup->in.domain_name = lp_workgroup(global_loadparm);
lookup->in.name_type = NBT_NAME_PDC;
status = libnet_LookupDCs(ctx, mem_ctx, lookup);
@@ -178,7 +178,7 @@ BOOL torture_lookup_sam_name(struct torture_context *torture)
if (mem_ctx == NULL) return False;
r.in.name = "Administrator";
- r.in.domain_name = lp_workgroup();
+ r.in.domain_name = lp_workgroup(global_loadparm);
status = libnet_LookupName(ctx, mem_ctx, &r);
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 1509324b65..bb9a8d2f34 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -163,7 +163,7 @@ BOOL torture_rpc_connect_pdc(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup();
+ domain_name = lp_workgroup(global_loadparm);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -183,7 +183,7 @@ BOOL torture_rpc_connect_dc(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup();
+ domain_name = lp_workgroup(global_loadparm);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -203,7 +203,7 @@ BOOL torture_rpc_connect_dc_info(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup();
+ domain_name = lp_workgroup(global_loadparm);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index a642d4bf52..640816b891 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -245,7 +245,7 @@ BOOL torture_createuser(struct torture_context *torture)
ctx->cred = cmdline_credentials;
req.in.user_name = TEST_USERNAME;
- req.in.domain_name = lp_workgroup();
+ req.in.domain_name = lp_workgroup(global_loadparm);
req.out.error_string = NULL;
status = libnet_CreateUser(ctx, mem_ctx, &req);
@@ -291,7 +291,7 @@ BOOL torture_deleteuser(struct torture_context *torture)
ctx->cred = cmdline_credentials;
req.in.user_name = TEST_USERNAME;
- req.in.domain_name = lp_workgroup();
+ req.in.domain_name = lp_workgroup(global_loadparm);
status = torture_rpc_connection(torture,
&p,
@@ -301,7 +301,7 @@ BOOL torture_deleteuser(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, prep_mem_ctx, &h, &domain_name)) {
ret = False;
goto done;
@@ -488,7 +488,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
name = talloc_strdup(prep_mem_ctx, TEST_USERNAME);
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, prep_mem_ctx, &h, &domain_name)) {
ret = False;
goto done;
@@ -511,7 +511,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
for (fld = 1; fld < FIELDS_NUM - 1; fld++) {
ZERO_STRUCT(req);
- req.in.domain_name = lp_workgroup();
+ req.in.domain_name = lp_workgroup(global_loadparm);
req.in.user_name = name;
set_test_changes(mem_ctx, &req, 1, &name, fld);
@@ -524,7 +524,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
}
ZERO_STRUCT(user_req);
- user_req.in.domain_name = lp_workgroup();
+ user_req.in.domain_name = lp_workgroup(global_loadparm);
user_req.in.user_name = name;
status = libnet_UserInfo(ctx, mem_ctx, &user_req);
@@ -563,7 +563,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
/* restore original testing username - it's useful when test fails
because it prevents from problems with recreating account */
ZERO_STRUCT(req);
- req.in.domain_name = lp_workgroup();
+ req.in.domain_name = lp_workgroup(global_loadparm);
req.in.user_name = name;
req.in.account_name = TEST_USERNAME;
@@ -624,7 +624,7 @@ BOOL torture_userinfo_api(struct torture_context *torture)
return False;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, prep_mem_ctx, &h, &domain_name)) {
ret = False;
goto done;
@@ -682,7 +682,7 @@ BOOL torture_userlist(struct torture_context *torture)
ctx = libnet_context_init(NULL);
ctx->cred = cmdline_credentials;
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
mem_ctx = talloc_init("torture user list");
ZERO_STRUCT(req);
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c
index b53965b91e..731731865b 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -148,7 +148,7 @@ bool torture_userinfo(struct torture_context *torture)
return False;
}
- name.string = lp_workgroup();
+ name.string = lp_workgroup(global_loadparm);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index fbd0a124f0..ff2f2d5265 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -325,7 +325,7 @@ BOOL torture_useradd(struct torture_context *torture)
return False;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, mem_ctx, &h, &domain_name, &sid)) {
ret = False;
goto done;
@@ -384,7 +384,7 @@ bool torture_userdel(struct torture_context *torture)
return False;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
if (!test_opendomain(p, mem_ctx, &h, &domain_name, &sid)) {
ret = False;
goto done;
@@ -430,7 +430,7 @@ BOOL torture_usermod(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup();
+ domain_name.string = lp_workgroup(global_loadparm);
name = talloc_strdup(mem_ctx, TEST_USERNAME);
if (!test_opendomain(p, mem_ctx, &h, &domain_name, &sid)) {
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index e99ff715a2..fc339bfcc5 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -25,6 +25,7 @@
#include "auth/gensec/gensec.h"
#include "libcli/libcli.h"
#include "param/param.h"
+#include "dynconfig.h"
static int numops = 1000;
static BOOL showall;
@@ -560,7 +561,7 @@ static void usage(void)
argc -= NSERVERS;
argv += NSERVERS;
- lp_load();
+ lp_load(dyn_CONFIGFILE);
servers[0] = cli_credentials_init(talloc_autofree_context());
servers[1] = cli_credentials_init(talloc_autofree_context());
diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c
index 9d4f0260b1..970873a3a6 100644
--- a/source4/torture/locktest2.c
+++ b/source4/torture/locktest2.c
@@ -483,7 +483,7 @@ static void usage(void)
argc -= 4;
argv += 4;
- lp_load();
+ lp_load(dyn_CONFIGFILE);
if (getenv("USER")) {
fstrcpy(username,getenv("USER"));
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 9019bf913b..153cee2680 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -27,6 +27,7 @@
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "param/param.h"
+#include "dynconfig.h"
static struct cli_credentials *credentials;
static BOOL showall = False;
@@ -301,7 +302,7 @@ static void usage(void)
argc -= 1;
argv += 1;
- lp_load();
+ lp_load(dyn_CONFIGFILE);
credentials = cli_credentials_init(talloc_autofree_context());
cli_credentials_guess(credentials);
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index e3bfaa6db3..e9cfda4b17 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -78,7 +78,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup();
+ name.name = lp_workgroup(global_loadparm);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -91,7 +91,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port());
+ myaddress, lp_dgram_port(global_loadparm));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -157,7 +157,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup();
+ name.name = lp_workgroup(global_loadparm);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -169,7 +169,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port());
+ myaddress, lp_dgram_port(global_loadparm));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -266,7 +266,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
const char *address;
struct nbt_name name;
- name.name = lp_workgroup();
+ name.name = lp_workgroup(global_loadparm);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
@@ -278,7 +278,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
myaddress = talloc_strdup(dgmsock, iface_best_ip(address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port());
+ myaddress, lp_dgram_port(global_loadparm));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -299,7 +299,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
ACB_WSTRUST, &machine_credentials);
torture_assert(tctx, join_ctx != NULL,
talloc_asprintf(tctx, "Failed to join domain %s as %s\n",
- lp_workgroup(), TEST_NAME));
+ lp_workgroup(global_loadparm), TEST_NAME));
dom_sid = torture_join_sid(join_ctx);
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index c829b36e8e..f0b17b9778 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -629,7 +629,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
if (!ctx->nbtsock_srv) return NULL;
/* Make a port 137 version of ctx->myaddr */
- nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lp_nbt_port());
+ nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lp_nbt_port(global_loadparm));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -654,7 +654,8 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
/* Make a port 137 version of ctx->myaddr2 */
nbt_srv_addr = socket_address_from_strings(tctx,
ctx->nbtsock_srv->sock->backend_name,
- ctx->myaddr2->addr, lp_nbt_port());
+ ctx->myaddr2->addr,
+ lp_nbt_port(global_loadparm));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -9155,7 +9156,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
if (!ctx->nbtsock_srv) {
torture_comment(tctx, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
- lp_nbt_port());
+ lp_nbt_port(global_loadparm));
return true;
}
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 283781205f..ab406f8624 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -159,7 +159,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io2.in.service_type = "A:";
io2.in.credentials = cmdline_credentials;
- io2.in.workgroup = lp_workgroup();
+ io2.in.workgroup = lp_workgroup(global_loadparm);
io2.in.filename = fname;
printf("testing parallel fetchfile with %d ops\n", torture_numops);
@@ -346,7 +346,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io1.in.service = lp_parm_string(NULL, "torture", "share");
io1.in.service_type = "A:";
io1.in.credentials = cmdline_credentials;
- io1.in.workgroup = lp_workgroup();
+ io1.in.workgroup = lp_workgroup(global_loadparm);
io1.in.level = RAW_QFS_OBJECTID_INFORMATION;
printf("testing parallel queryfsinfo [Object ID] with %d ops\n", torture_numops);
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 5b2e0f8af8..af3c56fb27 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -92,7 +92,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
@@ -107,7 +107,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
session2->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
@@ -134,7 +134,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
session3->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
@@ -148,10 +148,10 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
session4->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
anon_creds = cli_credentials_init(mem_ctx);
- cli_credentials_set_conf(anon_creds);
+ cli_credentials_set_conf(anon_creds, global_loadparm);
cli_credentials_set_anonymous(anon_creds);
setup.in.credentials = anon_creds;
@@ -225,7 +225,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (i=0; i <ARRAY_SIZE(sessions); i++) {
setups[i].in.sesskey = cli->transport->negotiate.sesskey;
setups[i].in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setups[i].in.workgroup = lp_workgroup();
+ setups[i].in.workgroup = lp_workgroup(global_loadparm);
setups[i].in.credentials = cmdline_credentials;
@@ -392,7 +392,7 @@ static BOOL test_tree_ulogoff(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
session1 = smbcli_session_init(cli->transport, mem_ctx, False);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
status = smb_composite_sesssetup(session1, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -448,7 +448,7 @@ static BOOL test_tree_ulogoff(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
session2 = smbcli_session_init(cli->transport, mem_ctx, False);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
status = smb_composite_sesssetup(session2, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -645,7 +645,7 @@ static BOOL test_pid_2sess(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
@@ -890,7 +890,7 @@ bool torture_raw_context(struct torture_context *torture,
struct smbcli_state *cli)
{
bool ret = true;
- if (lp_use_spnego()) {
+ if (lp_use_spnego(global_loadparm)) {
ret &= torture_raw_context_int(torture, cli);
lp_set_cmdline(global_loadparm, "use spnego", "False");
}
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index c47f3c7978..245a15d269 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -592,7 +592,7 @@ static bool test_async(struct torture_context *tctx,
session = smbcli_session_init(cli->transport, tctx, False);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
setup.in.credentials = cmdline_credentials;
status = smb_composite_sesssetup(session, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index 55cab9e117..97509606c3 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -190,7 +190,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te,
io->in.service_type = state->service_type;
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = False;
- io->in.workgroup = lp_workgroup();
+ io->in.workgroup = lp_workgroup(global_loadparm);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c
index d412a0406c..dcba73dfff 100644
--- a/source4/torture/raw/openbench.c
+++ b/source4/torture/raw/openbench.c
@@ -128,7 +128,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te,
io->in.service_type = state->service_type;
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = False;
- io->in.workgroup = lp_workgroup();
+ io->in.workgroup = lp_workgroup(global_loadparm);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index aad13ecd8f..ec53af93e8 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -344,7 +344,7 @@ bool torture_samba3_badpath(struct torture_context *torture)
return False;
}
- nt_status_support = lp_nt_status_support();
+ nt_status_support = lp_nt_status_support(global_loadparm);
if (!lp_set_cmdline(global_loadparm, "nt status support", "yes")) {
printf("Could not set 'nt status support = yes'\n");
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 5ea578e041..79063e86da 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -265,7 +265,7 @@ static BOOL test_GetInfo(struct DsSyncTest *ctx)
r.in.req.req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
r.in.req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
r.in.req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
- names[0].str = talloc_asprintf(ctx, "%s\\", lp_workgroup());
+ names[0].str = talloc_asprintf(ctx, "%s\\", lp_workgroup(global_loadparm));
status = dcerpc_drsuapi_DsCrackNames(ctx->admin.drsuapi.pipe, ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 6352865d98..3ff0561f77 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -452,11 +452,11 @@ bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
DATA_BLOB names_blob, chal, lm_resp, nt_resp;
int i;
int flags = CLI_CRED_NTLM_AUTH;
- if (lp_client_lanman_auth()) {
+ if (lp_client_lanman_auth(global_loadparm)) {
flags |= CLI_CRED_LANMAN_AUTH;
}
- if (lp_client_ntlmv2_auth()) {
+ if (lp_client_ntlmv2_auth(global_loadparm)) {
flags |= CLI_CRED_NTLMv2_AUTH;
}
@@ -740,7 +740,7 @@ static bool test_GetDcName(struct torture_context *tctx,
struct netr_GetDcName r;
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
- r.in.domainname = lp_workgroup();
+ r.in.domainname = lp_workgroup(global_loadparm);
status = dcerpc_netr_GetDcName(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "GetDcName");
@@ -787,7 +787,7 @@ static bool test_GetAnyDCName(struct torture_context *tctx,
struct netr_GetAnyDCName r;
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
- r.in.domainname = lp_workgroup();
+ r.in.domainname = lp_workgroup(global_loadparm);
status = dcerpc_netr_GetAnyDCName(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "GetAnyDCName");
@@ -813,7 +813,7 @@ static bool test_LogonControl2(struct torture_context *tctx,
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.function_code = NETLOGON_CONTROL_REDISCOVER;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -826,7 +826,7 @@ static bool test_LogonControl2(struct torture_context *tctx,
}
r.in.function_code = NETLOGON_CONTROL_TC_QUERY;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -839,7 +839,7 @@ static bool test_LogonControl2(struct torture_context *tctx,
}
r.in.function_code = NETLOGON_CONTROL_TRANSPORT_NOTIFY;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -932,7 +932,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx,
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.function_code = NETLOGON_CONTROL_REDISCOVER;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -945,7 +945,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx,
}
r.in.function_code = NETLOGON_CONTROL_TC_QUERY;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -958,7 +958,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx,
}
r.in.function_code = NETLOGON_CONTROL_TRANSPORT_NOTIFY;
- r.in.data.domain = lp_workgroup();
+ r.in.data.domain = lp_workgroup(global_loadparm);
for (i=1;i<4;i++) {
r.in.level = i;
@@ -1090,7 +1090,7 @@ static bool test_netr_DsRGetDCName(struct torture_context *tctx,
struct netr_DsRGetDCName r;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
- r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm());
+ r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm(global_loadparm));
r.in.domain_guid = NULL;
r.in.site_guid = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
@@ -1113,7 +1113,7 @@ static bool test_netr_DsRGetDCNameEx(struct torture_context *tctx,
struct netr_DsRGetDCNameEx r;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
- r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm());
+ r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm(global_loadparm));
r.in.domain_guid = NULL;
r.in.site_name = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
@@ -1138,7 +1138,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.client_account = NULL;
r.in.mask = 0x00000000;
- r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm());
+ r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm(global_loadparm));
r.in.domain_guid = NULL;
r.in.site_name = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index e6f54037bc..75a7d760d9 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -58,7 +58,7 @@ static struct cli_credentials *create_anon_creds(TALLOC_CTX *mem_ctx)
return NULL;
}
- cli_credentials_set_conf(result);
+ cli_credentials_set_conf(result, global_loadparm);
cli_credentials_set_anonymous(result);
return result;
@@ -1163,7 +1163,7 @@ BOOL torture_netlogon_samba3(struct torture_context *torture)
goto done;
}
- cli_credentials_set_conf(wks_creds);
+ cli_credentials_set_conf(wks_creds, global_loadparm);
cli_credentials_set_secure_channel_type(wks_creds, SEC_CHAN_WKSTA);
cli_credentials_set_username(wks_creds, wks_name, CRED_SPECIFIED);
cli_credentials_set_workstation(wks_creds, wks_name, CRED_SPECIFIED);
@@ -1244,7 +1244,7 @@ static BOOL test_join3(TALLOC_CTX *mem_ctx,
goto done;
}
- cli_credentials_set_conf(wks_creds);
+ cli_credentials_set_conf(wks_creds, global_loadparm);
cli_credentials_set_secure_channel_type(wks_creds, SEC_CHAN_WKSTA);
cli_credentials_set_username(wks_creds, wks_name, CRED_SPECIFIED);
cli_credentials_set_workstation(wks_creds, wks_name, CRED_SPECIFIED);
@@ -1648,7 +1648,7 @@ BOOL torture_samba3_rpc_getusername(struct torture_context *torture)
goto done;
}
- cli_credentials_set_conf(user_creds);
+ cli_credentials_set_conf(user_creds, global_loadparm);
cli_credentials_set_username(user_creds, "torture_username",
CRED_SPECIFIED);
cli_credentials_set_password(user_creds,
@@ -2435,7 +2435,7 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture)
ZERO_STRUCT(userlevel1);
userlevel1.client = talloc_asprintf(
- mem_ctx, "\\\\%s", lp_netbios_name());
+ mem_ctx, "\\\\%s", lp_netbios_name(global_loadparm));
userlevel1.user = cli_credentials_get_username(cmdline_credentials);
userlevel1.build = 2600;
userlevel1.major = 3;
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 92c4da6321..46ed363423 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -591,7 +591,7 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, TEST_MACHINE_NAME, lp_workgroup());
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, TEST_MACHINE_NAME, lp_workgroup(global_loadparm));
uint8_t lm_session_key[8];
uint8_t user_session_key[16];
@@ -739,7 +739,7 @@ static BOOL test_lmv2_ntlm_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, lp_netbios_name(), lp_workgroup());
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, lp_netbios_name(global_loadparm), lp_workgroup(global_loadparm));
DATA_BLOB ntlm_response = data_blob_talloc(samlogon_state->mem_ctx, NULL, 24);
DATA_BLOB ntlm_session_key = data_blob_talloc(samlogon_state->mem_ctx, NULL, 16);
@@ -1512,7 +1512,7 @@ BOOL torture_rpc_samlogon(struct torture_context *torture)
return False;
}
- userdomain = torture_setting_string(torture, "userdomain", lp_workgroup());
+ userdomain = torture_setting_string(torture, "userdomain", lp_workgroup(global_loadparm));
user_ctx = torture_create_testuser(torture,
TEST_USER_NAME,
@@ -1735,7 +1735,7 @@ BOOL torture_rpc_samlogon(struct torture_context *torture)
.username = talloc_asprintf(mem_ctx,
"%s@%s",
TEST_USER_NAME,
- lp_realm()),
+ lp_realm(global_loadparm)),
.password = user_password,
.network_login = True,
.expected_interactive_error = NT_STATUS_OK,
diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c
index 9459485674..7d3395c5d0 100644
--- a/source4/torture/rpc/samr_accessmask.c
+++ b/source4/torture/rpc/samr_accessmask.c
@@ -412,7 +412,7 @@ static bool test_samr_accessmask_LookupDomain(struct torture_context *tctx,
ld.in.connect_handle = &ch;
ld.in.domain_name = &dn;
- dn.string = lp_workgroup();
+ dn.string = lp_workgroup(global_loadparm);
status = dcerpc_samr_LookupDomain(p, tctx, &ld);
if (!NT_STATUS_IS_OK(status)) {
@@ -436,7 +436,7 @@ static bool test_samr_accessmask_LookupDomain(struct torture_context *tctx,
ld.in.connect_handle = &ch;
ld.in.domain_name = &dn;
- dn.string = lp_workgroup();
+ dn.string = lp_workgroup(global_loadparm);
status = dcerpc_samr_LookupDomain(p, tctx, &ld);
if(!NT_STATUS_EQUAL(NT_STATUS_ACCESS_DENIED, status)) {
@@ -488,7 +488,7 @@ static bool test_samr_accessmask_OpenDomain(struct torture_context *tctx,
ld.in.connect_handle = &ch;
ld.in.domain_name = &dn;
- dn.string = lp_workgroup();
+ dn.string = lp_workgroup(global_loadparm);
status = dcerpc_samr_LookupDomain(p, tctx, &ld);
if (!NT_STATUS_IS_OK(status)) {
printf("LookupDomain failed - %s\n", nt_errstr(status));
@@ -569,14 +569,16 @@ static bool test_samr_connect(struct torture_context *tctx,
const struct dom_sid *test_sid;
/* create a test user */
- testuser = torture_create_testuser(tctx, TEST_USER_NAME, lp_workgroup(), ACB_NORMAL, &testuser_passwd);
+ testuser = torture_create_testuser(tctx, TEST_USER_NAME, lp_workgroup(global_loadparm),
+ ACB_NORMAL, &testuser_passwd);
if (!testuser) {
printf("Failed to create test user\n");
return False;
}
test_credentials = cli_credentials_init(tctx);
cli_credentials_set_workstation(test_credentials, "localhost", CRED_SPECIFIED);
- cli_credentials_set_domain(test_credentials, lp_workgroup(), CRED_SPECIFIED);
+ cli_credentials_set_domain(test_credentials, lp_workgroup(global_loadparm),
+ CRED_SPECIFIED);
cli_credentials_set_username(test_credentials, TEST_USER_NAME, CRED_SPECIFIED);
cli_credentials_set_password(test_credentials, testuser_passwd, CRED_SPECIFIED);
test_sid = torture_join_user_sid(testuser);
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 013a6db0bb..8494bdb543 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -1431,7 +1431,8 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
mem_ctx = talloc_init("torture_rpc_netlogon");
test_machine_account = talloc_asprintf(mem_ctx, "%s$", TEST_MACHINE_NAME);
- join_ctx = torture_create_testuser(torture, test_machine_account, lp_workgroup(), ACB_SVRTRUST,
+ join_ctx = torture_create_testuser(torture, test_machine_account,
+ lp_workgroup(global_loadparm), ACB_SVRTRUST,
&machine_password);
if (!join_ctx) {
talloc_free(mem_ctx);
@@ -1440,8 +1441,7 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
}
test_wksta_machine_account = talloc_asprintf(mem_ctx, "%s$", TEST_WKSTA_MACHINE_NAME);
- join_ctx2 = torture_create_testuser(torture, test_wksta_machine_account, lp_workgroup(), ACB_WSTRUST,
- &wksta_machine_password);
+ join_ctx2 = torture_create_testuser(torture, test_wksta_machine_account, lp_workgroup(global_loadparm), ACB_WSTRUST, &wksta_machine_password);
if (!join_ctx2) {
talloc_free(mem_ctx);
printf("Failed to join as member\n");
@@ -1449,7 +1449,7 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
}
user_ctx = torture_create_testuser(torture, TEST_USER_NAME,
- lp_workgroup(),
+ lp_workgroup(global_loadparm),
ACB_NORMAL, NULL);
if (!user_ctx) {
talloc_free(mem_ctx);
@@ -1473,7 +1473,7 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
goto failed;
}
- domain_policy = samsync_open_domain(mem_ctx, samsync_state, lp_workgroup(), NULL);
+ domain_policy = samsync_open_domain(mem_ctx, samsync_state, lp_workgroup(global_loadparm), NULL);
if (!domain_policy) {
printf("samrsync_open_domain failed\n");
ret = False;
@@ -1548,7 +1548,7 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
credentials = cli_credentials_init(mem_ctx);
cli_credentials_set_workstation(credentials, TEST_MACHINE_NAME, CRED_SPECIFIED);
- cli_credentials_set_domain(credentials, lp_workgroup(), CRED_SPECIFIED);
+ cli_credentials_set_domain(credentials, lp_workgroup(global_loadparm), CRED_SPECIFIED);
cli_credentials_set_username(credentials, test_machine_account, CRED_SPECIFIED);
cli_credentials_set_password(credentials, machine_password, CRED_SPECIFIED);
cli_credentials_set_secure_channel_type(credentials,
@@ -1585,7 +1585,7 @@ BOOL torture_rpc_samsync(struct torture_context *torture)
credentials_wksta = cli_credentials_init(mem_ctx);
cli_credentials_set_workstation(credentials_wksta, TEST_WKSTA_MACHINE_NAME, CRED_SPECIFIED);
- cli_credentials_set_domain(credentials_wksta, lp_workgroup(), CRED_SPECIFIED);
+ cli_credentials_set_domain(credentials_wksta, lp_workgroup(global_loadparm), CRED_SPECIFIED);
cli_credentials_set_username(credentials_wksta, test_wksta_machine_account, CRED_SPECIFIED);
cli_credentials_set_password(credentials_wksta, wksta_machine_password, CRED_SPECIFIED);
cli_credentials_set_secure_channel_type(credentials_wksta,
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 7d963be1bb..cb70582615 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -47,11 +47,11 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
DATA_BLOB names_blob, chal, lm_resp, nt_resp;
int i;
int flags = CLI_CRED_NTLM_AUTH;
- if (lp_client_lanman_auth()) {
+ if (lp_client_lanman_auth(global_loadparm)) {
flags |= CLI_CRED_LANMAN_AUTH;
}
- if (lp_client_ntlmv2_auth()) {
+ if (lp_client_ntlmv2_auth(global_loadparm)) {
flags |= CLI_CRED_NTLMv2_AUTH;
}
@@ -122,7 +122,7 @@ static bool test_samr_ops(struct torture_context *tctx,
struct policy_handle handle;
struct policy_handle domain_handle;
- name.string = lp_workgroup();
+ name.string = lp_workgroup(global_loadparm);
r.in.domain_name = &name;
connect.in.system_name = 0;
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index f32d6832a3..79a1b87376 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -276,7 +276,8 @@ again:
u.info21.description.string = talloc_asprintf(join,
"Samba4 torture account created by host %s: %s",
- lp_netbios_name(), timestring(join, time(NULL)));
+ lp_netbios_name(global_loadparm),
+ timestring(join, time(NULL)));
printf("Resetting ACB flags, force pw change time\n");
@@ -382,7 +383,7 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
u.info21.description.string = talloc_asprintf(tj,
"Samba4 torture account created by host %s: %s",
- lp_netbios_name(), timestring(tj, time(NULL)));
+ lp_netbios_name(global_loadparm), timestring(tj, time(NULL)));
status = dcerpc_samr_SetUserInfo(tj->p, tj, &s);
if (!NT_STATUS_IS_OK(status)) {
@@ -390,7 +391,7 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
}
*machine_credentials = cli_credentials_init(tj);
- cli_credentials_set_conf(*machine_credentials);
+ cli_credentials_set_conf(*machine_credentials, global_loadparm);
cli_credentials_set_workstation(*machine_credentials, machine_name, CRED_SPECIFIED);
cli_credentials_set_domain(*machine_credentials, libnet_r->out.domain_name, CRED_SPECIFIED);
if (libnet_r->out.realm) {
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index c648273c83..12d6f82643 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -292,7 +292,7 @@ bool wire_bad_flags(struct smb_wire_string *str, int flags, struct smbcli_transp
if (flags & STR_TERMINATE) len++;
server_unicode = (transport->negotiate.capabilities&CAP_UNICODE)?True:False;
- if (getenv("CLI_FORCE_ASCII") || !lp_unicode()) {
+ if (getenv("CLI_FORCE_ASCII") || !lp_unicode(global_loadparm)) {
server_unicode = False;
}
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 5fc941f45a..877742a26d 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -112,7 +112,7 @@ static bool torture_winbind_struct_info(struct torture_context *torture)
separator = torture_setting_string(torture,
"winbindd separator",
- lp_winbind_separator());
+ lp_winbind_separator(global_loadparm));
torture_assert_int_equal(torture,
rep.data.info.winbind_separator,
*separator,
@@ -166,7 +166,7 @@ static bool torture_winbind_struct_netbios_name(struct torture_context *torture)
expected = torture_setting_string(torture,
"winbindd netbios name",
- lp_netbios_name());
+ lp_netbios_name(global_loadparm));
torture_assert_str_equal(torture,
rep.data.netbios_name, expected,
@@ -188,7 +188,7 @@ static bool torture_winbind_struct_domain_name(struct torture_context *torture)
expected = torture_setting_string(torture,
"winbindd netbios domain",
- lp_workgroup());
+ lp_workgroup(global_loadparm));
torture_assert_str_equal(torture,
rep.data.domain_name, expected,