summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 23:33:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:55 +0100
commit509e82e402d64c79f27c9a10d75b100a1ac5fefa (patch)
treea7770d609512848c17f413764e9dc0bd43acce5d /source4/torture
parentda0f222f432c4fc8bf5da80baf849ca32b315ca0 (diff)
downloadsamba-509e82e402d64c79f27c9a10d75b100a1ac5fefa.tar.gz
samba-509e82e402d64c79f27c9a10d75b100a1ac5fefa.tar.bz2
samba-509e82e402d64c79f27c9a10d75b100a1ac5fefa.zip
r26272: Remove global_loadparm in some more places.
(This used to be commit 1ab76ecc5311fa863e5d04899b6f110899818f55)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c3
-rw-r--r--source4/torture/locktest.c8
-rw-r--r--source4/torture/rpc/drsuapi.c4
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c7
4 files changed, 13 insertions, 9 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 9f05380b48..6044e358c4 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -254,7 +254,8 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
talloc_free(s->ldb);
- DEBUG(0,("Open the SAM LDB with system credentials: %s\n", s->path.samdb_ldb));
+ 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),
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index 7d111be12b..381abaebc6 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -105,7 +105,8 @@ static struct record *recorded;
/*****************************************************
return a connection to a server
*******************************************************/
-static struct smbcli_state *connect_one(char *share, int snum, int conn)
+static struct smbcli_state *connect_one(struct loadparm_context *lp_ctx,
+ char *share, int snum, int conn)
{
struct smbcli_state *c;
fstring server, myname;
@@ -124,7 +125,7 @@ static struct smbcli_state *connect_one(char *share, int snum, int conn)
char **unc_list = NULL;
int num_unc_names;
const char *p;
- p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
+ p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
if (p) {
char *h, *s;
unc_list = file_lines_load(p, &num_unc_names, NULL);
@@ -183,7 +184,8 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum
}
talloc_free(cli[server][conn]);
}
- cli[server][conn] = connect_one(share[server], server, conn);
+ cli[server][conn] = connect_one(global_loadparm, share[server],
+ server, conn);
if (!cli[server][conn]) {
DEBUG(0,("Failed to connect to %s\n", share[server]));
exit(1);
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 7fc2406bbf..5e01c2050c 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -719,7 +719,7 @@ bool torture_rpc_drsuapi(struct torture_context *torture)
#endif
ret &= test_DsGetDomainControllerInfo(p, torture, &priv);
- ret &= test_DsCrackNames(p, torture, &priv);
+ ret &= test_DsCrackNames(torture, p, torture, &priv);
ret &= test_DsWriteAccountSpn(p, torture, &priv);
@@ -771,7 +771,7 @@ bool torture_rpc_drsuapi_cracknames(struct torture_context *torture)
/* We don't care if this fails, we just need some info from it */
test_DsGetDomainControllerInfo(p, torture, &priv);
- ret &= test_DsCrackNames(p, torture, &priv);
+ ret &= test_DsCrackNames(torture, p, torture, &priv);
ret &= test_DsUnbind(p, torture, &priv);
}
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index ac3eebfa68..89d9b7bd34 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -204,8 +204,9 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-bool test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct DsPrivate *priv)
+bool test_DsCrackNames(struct torture_context *tctx,
+ struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct DsPrivate *priv)
{
NTSTATUS status;
struct drsuapi_DsCrackNames r;
@@ -589,7 +590,7 @@ bool test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
.comment = "display name for Microsoft Support Account",
.status = DRSUAPI_DS_NAME_STATUS_OK,
.alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE,
- .skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)
+ .skip = torture_setting_bool(tctx, "samba4", false)
},
{
.format_offered = DRSUAPI_DS_NAME_FORMAT_GUID,