summaryrefslogtreecommitdiff
path: root/source4/torture/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-07 02:37:04 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:41 +0100
commit4c4323009fa83f00ed319de59a3aad48fcd65994 (patch)
tree4eb290c8e7881e1b9b9f77f8401531443aa81bf4 /source4/torture/libnet
parent485b24fc113fe64507e20b9079948832d63194a3 (diff)
downloadsamba-4c4323009fa83f00ed319de59a3aad48fcd65994.tar.gz
samba-4c4323009fa83f00ed319de59a3aad48fcd65994.tar.bz2
samba-4c4323009fa83f00ed319de59a3aad48fcd65994.zip
r26327: Explicit loadparm_context for RPC client functions.
(This used to be commit eeb2251d22b3d6e0379444a73af69d1014692b07)
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r--source4/torture/libnet/domain.c2
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c6
-rw-r--r--source4/torture/libnet/libnet_domain.c14
-rw-r--r--source4/torture/libnet/libnet_group.c2
-rw-r--r--source4/torture/libnet/libnet_lookup.c8
-rw-r--r--source4/torture/libnet/libnet_rpc.c2
-rw-r--r--source4/torture/libnet/libnet_share.c4
-rw-r--r--source4/torture/libnet/libnet_user.c10
8 files changed, 24 insertions, 24 deletions
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index c75050eb55..ff1fbcab78 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -83,7 +83,7 @@ bool torture_domainopen(struct torture_context *torture)
mem_ctx = talloc_init("test_domain_open");
evt_ctx = event_context_find(torture);
- net_ctx = libnet_context_init(evt_ctx);
+ net_ctx = libnet_context_init(evt_ctx, torture->lp_ctx);
status = torture_rpc_connection(torture,
&net_ctx->samr.pipe,
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 2b8fef0178..1eaed12701 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -258,8 +258,8 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
DEBUG(0,("Open the SAM LDB with system credentials: %s\n",
s->path.samdb_ldb));
- s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
- system_session(s, global_loadparm),
+ s->ldb = ldb_wrap_connect(s, s->tctx->lp_ctx, s->path.samdb_ldb,
+ system_session(s, s->tctx->lp_ctx),
NULL, 0, NULL);
if (!s->ldb) {
DEBUG(0,("Failed to open '%s'\n",
@@ -758,7 +758,7 @@ bool torture_net_become_dc(struct torture_context *torture)
return false;
}
- s->ctx = libnet_context_init(torture->ev);
+ s->ctx = libnet_context_init(torture->ev, torture->lp_ctx);
s->ctx->cred = cmdline_credentials;
s->ldb = ldb_init(s);
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c
index 6ec5302d91..3c8d574f0e 100644
--- a/source4/torture/libnet/libnet_domain.c
+++ b/source4/torture/libnet/libnet_domain.c
@@ -136,7 +136,7 @@ bool torture_domain_open_lsa(struct torture_context *torture)
of specific server name. */
domain_name = lp_workgroup(torture->lp_ctx);
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
if (ctx == NULL) {
d_printf("failed to create libnet context\n");
return false;
@@ -190,7 +190,7 @@ bool torture_domain_close_lsa(struct torture_context *torture)
return false;
}
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
if (ctx == NULL) {
d_printf("failed to create libnet context\n");
ret = false;
@@ -201,7 +201,7 @@ bool torture_domain_close_lsa(struct torture_context *torture)
mem_ctx = talloc_init("torture_domain_close_lsa");
status = dcerpc_pipe_connect_b(mem_ctx, &p, binding, &ndr_table_lsarpc,
- cmdline_credentials, NULL);
+ cmdline_credentials, NULL, torture->lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to connect to server: %s\n", nt_errstr(status));
ret = false;
@@ -255,7 +255,7 @@ bool torture_domain_open_samr(struct torture_context *torture)
mem_ctx = talloc_init("test_domainopen_lsa");
- ctx = libnet_context_init(evt_ctx);
+ ctx = libnet_context_init(evt_ctx, torture->lp_ctx);
ctx->cred = cmdline_credentials;
/* we're accessing domain controller so the domain name should be
@@ -320,7 +320,7 @@ bool torture_domain_close_samr(struct torture_context *torture)
return false;
}
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
if (ctx == NULL) {
d_printf("failed to create libnet context\n");
ret = false;
@@ -331,7 +331,7 @@ bool torture_domain_close_samr(struct torture_context *torture)
mem_ctx = talloc_init("torture_domain_close_samr");
status = dcerpc_pipe_connect_b(mem_ctx, &p, binding, &ndr_table_samr,
- ctx->cred, NULL);
+ ctx->cred, NULL, torture->lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
d_printf("failed to connect to server: %s\n", nt_errstr(status));
ret = false;
@@ -388,7 +388,7 @@ bool torture_domain_list(struct torture_context *torture)
return false;
}
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
if (ctx == NULL) {
d_printf("failed to create libnet context\n");
ret = false;
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c
index 5029d77dd6..02fc0f7fd5 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -216,7 +216,7 @@ bool torture_groupinfo_api(struct torture_context *torture)
prep_mem_ctx = talloc_init("prepare torture group info");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
status = torture_rpc_connection(torture,
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index 6b4c03beb7..e4473b0fdd 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -40,7 +40,7 @@ bool torture_lookup(struct torture_context *torture)
mem_ctx = talloc_init("test_lookup");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
lookup.in.hostname = torture_setting_string(torture, "host", NULL);
@@ -84,7 +84,7 @@ bool torture_lookup_host(struct torture_context *torture)
mem_ctx = talloc_init("test_lookup_host");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
lookup.in.hostname = torture_setting_string(torture, "host", NULL);
@@ -127,7 +127,7 @@ bool torture_lookup_pdc(struct torture_context *torture)
mem_ctx = talloc_init("test_lookup_pdc");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
talloc_steal(ctx, mem_ctx);
@@ -171,7 +171,7 @@ bool torture_lookup_sam_name(struct torture_context *torture)
struct libnet_context *ctx;
struct libnet_LookupName r;
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
mem_ctx = talloc_init("torture lookup sam name");
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 1e042c77a6..282837d3fe 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -89,7 +89,7 @@ static bool torture_rpc_connect(struct torture_context *torture,
{
struct libnet_context *ctx;
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
d_printf("Testing connection to LSA interface\n");
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index d18e6ea9db..d693430b05 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -131,7 +131,7 @@ bool torture_listshares(struct torture_context *torture)
goto done;
}
- libnetctx = libnet_context_init(NULL);
+ libnetctx = libnet_context_init(NULL, torture->lp_ctx);
if (!libnetctx) {
printf("Couldn't allocate libnet context\n");
ret = false;
@@ -209,7 +209,7 @@ bool torture_delshare(struct torture_context *torture)
status = torture_rpc_binding(torture, &bind);
torture_assert_ntstatus_ok(torture, status, "Failed to get binding");
- libnetctx = libnet_context_init(NULL);
+ libnetctx = libnet_context_init(NULL, torture->lp_ctx);
libnetctx->cred = cmdline_credentials;
status = torture_rpc_connection(torture,
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index f4c3bd9918..8671e438b7 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -241,7 +241,7 @@ bool torture_createuser(struct torture_context *torture)
mem_ctx = talloc_init("test_createuser");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
req.in.user_name = TEST_USERNAME;
@@ -287,7 +287,7 @@ bool torture_deleteuser(struct torture_context *torture)
prep_mem_ctx = talloc_init("prepare test_deleteuser");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
req.in.user_name = TEST_USERNAME;
@@ -475,7 +475,7 @@ bool torture_modifyuser(struct torture_context *torture)
prep_mem_ctx = talloc_init("prepare test_deleteuser");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
status = torture_rpc_connection(torture,
@@ -609,7 +609,7 @@ bool torture_userinfo_api(struct torture_context *torture)
prep_mem_ctx = talloc_init("prepare torture user info");
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
status = torture_rpc_connection(torture,
@@ -674,7 +674,7 @@ bool torture_userlist(struct torture_context *torture)
struct libnet_UserList req;
int i;
- ctx = libnet_context_init(NULL);
+ ctx = libnet_context_init(NULL, torture->lp_ctx);
ctx->cred = cmdline_credentials;
domain_name.string = lp_workgroup(torture->lp_ctx);