summaryrefslogtreecommitdiff
path: root/source4/torture/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/libnet')
-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.c4
-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
11 files changed, 28 insertions, 28 deletions
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index daf9012e0c..c75050eb55 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(global_loadparm);
+ name.string = lp_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupinfo.c b/source4/torture/libnet/groupinfo.c
index bff2f405cd..55edb9d40d 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(global_loadparm);
+ name.string = lp_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupman.c b/source4/torture/libnet/groupman.c
index 552e02c420..adb055c750 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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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 ef8e4d03c0..cf07c9c611 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -817,7 +817,7 @@ bool torture_net_become_dc(struct torture_context *torture)
s->schema = NULL;
DEBUG(0,("Reopen the SAM LDB with system credentials and all replicated data: %s\n", s->path.samdb_ldb));
- s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
+ s->ldb = ldb_wrap_connect(s, torture->lp_ctx, s->path.samdb_ldb,
system_session(s),
NULL, 0, NULL);
if (!s->ldb) {
@@ -834,7 +834,7 @@ bool torture_net_become_dc(struct torture_context *torture)
goto cleanup;
}
- if (lp_parm_bool(global_loadparm, NULL, "become dc", "do not unjoin", false)) {
+ if (lp_parm_bool(torture->lp_ctx, NULL, "become dc", "do not unjoin", false)) {
talloc_free(s);
return ret;
}
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c
index 379cca19be..6ec5302d91 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(global_loadparm);
+ domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name = lp_workgroup(torture->lp_ctx);
/*
* 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(global_loadparm));
+ domain_name.string = talloc_strdup(mem_ctx, lp_workgroup(torture->lp_ctx));
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 a4489d376d..5029d77dd6 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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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 4734ec5088..6b4c03beb7 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(global_loadparm);
+ lookup->in.domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ r.in.domain_name = lp_workgroup(torture->lp_ctx);
status = libnet_LookupName(ctx, mem_ctx, &r);
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 5ca927a1e3..1e042c77a6 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(global_loadparm);
+ domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name = lp_workgroup(torture->lp_ctx);
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 b3aadc776e..514e42c0a5 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(global_loadparm);
+ req.in.domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ req.in.domain_name = lp_workgroup(torture->lp_ctx);
status = torture_rpc_connection(torture,
&p,
@@ -301,7 +301,7 @@ bool torture_deleteuser(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ req.in.domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ user_req.in.domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ req.in.domain_name = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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 46a9a6a015..e862435d20 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -147,7 +147,7 @@ bool torture_userinfo(struct torture_context *torture)
return false;
}
- name.string = lp_workgroup(global_loadparm);
+ name.string = lp_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index e834938bc5..0d08284a9f 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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
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(global_loadparm);
+ domain_name.string = lp_workgroup(torture->lp_ctx);
name = talloc_strdup(mem_ctx, TEST_USERNAME);
if (!test_opendomain(p, mem_ctx, &h, &domain_name, &sid)) {