summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 15:53:07 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:27 +0100
commit0a2f1a46a02d2c9497d05d7e534829dc6e9430dc (patch)
tree5647b3b0b98f97abc84a47a19613938345e0384c /source4/torture/rpc
parent53ae9bc9f6f66578948c3995073bdc1f1acae0f1 (diff)
downloadsamba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.gz
samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.bz2
samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.zip
r26249: Remove a couple more uses of global_loadparm.
(This used to be commit 80a61200508a00d5b16a3e748ce92d54b9fefcd2)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/dfs.c13
-rw-r--r--source4/torture/rpc/samba3rpc.c14
2 files changed, 15 insertions, 12 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index 2c68872a55..e169876b2b 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -115,13 +115,14 @@ static bool test_NetShareDel(TALLOC_CTX *mem_ctx,
static bool test_CreateDir(TALLOC_CTX *mem_ctx,
struct smbcli_state **cli,
+ struct torture_context *tctx,
const char *host,
const char *share,
const char *dir)
{
printf("Creating directory %s\n", dir);
- if (!torture_open_connection_share(mem_ctx, cli, host, share, NULL)) {
+ if (!torture_open_connection_share(mem_ctx, cli, tctx, host, share, NULL)) {
return false;
}
@@ -480,6 +481,7 @@ static bool test_AddStdRootForced(struct dcerpc_pipe *p,
static void test_cleanup_stdroot(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
+ struct torture_context *tctx,
const char *host,
const char *sharename,
const char *dir)
@@ -490,13 +492,14 @@ static void test_cleanup_stdroot(struct dcerpc_pipe *p,
test_RemoveStdRoot(p, mem_ctx, host, sharename);
test_NetShareDel(mem_ctx, host, sharename);
- torture_open_connection_share(mem_ctx, &cli, host, "C$", NULL);
+ torture_open_connection_share(mem_ctx, &cli, tctx, host, "C$", NULL);
test_DeleteDir(cli, dir);
torture_close_connection(cli);
}
static bool test_StdRoot(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
+ struct torture_context *tctx,
const char *host)
{
const char *sharename = SMBTORTURE_DFS_SHARENAME;
@@ -507,9 +510,9 @@ static bool test_StdRoot(struct dcerpc_pipe *p,
printf("Testing StdRoot\n");
- test_cleanup_stdroot(p, mem_ctx, host, sharename, dir);
+ test_cleanup_stdroot(p, mem_ctx, tctx, host, sharename, dir);
- ret &= test_CreateDir(mem_ctx, &cli, host, "C$", dir);
+ ret &= test_CreateDir(mem_ctx, &cli, tctx, host, "C$", dir);
ret &= test_NetShareAdd(mem_ctx, host, sharename, path);
ret &= test_AddStdRoot(p, mem_ctx, host, sharename);
ret &= test_RemoveStdRoot(p, mem_ctx, host, sharename);
@@ -652,7 +655,7 @@ bool torture_rpc_dfs(struct torture_context *torture)
ret &= test_ManagerInitialize(p, torture, host);
ret &= test_Enum(p, torture);
ret &= test_EnumEx(p, torture, host);
- ret &= test_StdRoot(p, torture, host);
+ ret &= test_StdRoot(p, torture, torture, host);
ret &= test_FtRoot(p, torture, host);
ret &= test_DcAddress(p, torture, host);
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 941c7b4f74..522b821b91 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1840,7 +1840,7 @@ bool torture_samba3_rpc_srvsvc(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
+ mem_ctx, &cli, torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
talloc_free(mem_ctx);
return false;
@@ -1902,7 +1902,7 @@ bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
if (!(torture_open_connection_share(
mem_ctx, &cli,
- torture_setting_string(torture, "host", NULL),
+ torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
goto done;
@@ -2193,7 +2193,7 @@ bool torture_samba3_rpc_sharesec(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
+ mem_ctx, &cli, torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2241,7 +2241,7 @@ bool torture_samba3_rpc_lsa(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
+ mem_ctx, &cli, torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2519,7 +2519,7 @@ bool torture_samba3_rpc_spoolss(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
+ mem_ctx, &cli, torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -2705,7 +2705,7 @@ bool torture_samba3_rpc_wkssvc(struct torture_context *torture)
}
if (!(torture_open_connection_share(
- mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
+ mem_ctx, &cli, torture, torture_setting_string(torture, "host", NULL),
"IPC$", NULL))) {
d_printf("IPC$ connection failed\n");
talloc_free(mem_ctx);
@@ -3255,7 +3255,7 @@ bool torture_samba3_regconfig(struct torture_context *torture)
bool ret = false;
const char *comment = "Dummer Kommentar";
- if (!(torture_open_connection(&cli, 0))) {
+ if (!(torture_open_connection(&cli, torture, 0))) {
return false;
}