summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/testjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc/testjoin.c')
-rw-r--r--source4/torture/rpc/testjoin.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 56a0fccde4..725799f2dd 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -36,6 +36,7 @@
#include "libcli/auth/libcli_auth.h"
#include "torture/rpc/rpc.h"
#include "libcli/security/security.h"
+#include "param/param.h"
struct test_join {
struct dcerpc_pipe *p;
@@ -125,7 +126,7 @@ struct test_join *torture_create_testuser(struct torture_context *torture,
int policy_min_pw_len = 0;
struct test_join *join;
char *random_pw;
- const char *dc_binding = lp_parm_string(-1, "torture", "dc_binding");
+ const char *dc_binding = lp_parm_string(global_loadparm, NULL, "torture", "dc_binding");
join = talloc(NULL, struct test_join);
if (join == NULL) {
@@ -275,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");
@@ -326,9 +328,9 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
tj->libnet_r = libnet_r;
libnet_ctx->cred = cmdline_credentials;
- libnet_r->in.binding = lp_parm_string(-1, "torture", "binding");
+ libnet_r->in.binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
if (!libnet_r->in.binding) {
- libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(-1, "torture", "host"));
+ libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(global_loadparm, NULL, "torture", "host"));
}
libnet_r->in.level = LIBNET_JOINDOMAIN_SPECIFIED;
libnet_r->in.netbios_name = machine_name;
@@ -339,7 +341,7 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
}
libnet_r->in.acct_type = acct_flags;
- libnet_r->in.recreate_account = True;
+ libnet_r->in.recreate_account = true;
status = libnet_JoinDomain(libnet_ctx, libnet_r, libnet_r);
if (!NT_STATUS_IS_OK(status)) {
@@ -381,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)) {
@@ -389,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) {