summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-31 01:02:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:47 -0500
commit00c7f9eed81866568abe1ec8a908fb4bc9274b59 (patch)
tree8d20fc76c76752ea718417d7f953660d571b0ca2 /source4/torture/rpc
parentc4e152850dc3cce08bdf751f2ae78e4efdd66dd0 (diff)
downloadsamba-00c7f9eed81866568abe1ec8a908fb4bc9274b59.tar.gz
samba-00c7f9eed81866568abe1ec8a908fb4bc9274b59.tar.bz2
samba-00c7f9eed81866568abe1ec8a908fb4bc9274b59.zip
r4422: make lp_set_cmdline("torture:dangerous", "Yes") a bool parameter
metze (This used to be commit 19482a2245abbf9154423ca8997957b56333fba2)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/drsuapi.c4
-rw-r--r--source4/torture/rpc/samr.c6
-rw-r--r--source4/torture/rpc/winreg.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index f44bf97568..2e3fe87bb4 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -772,7 +772,7 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
};
- if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("DsReplicaSync disabled - enable dangerous tests to use\n");
return True;
}
@@ -791,7 +791,7 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.req.req1.info->unknown2 = 120;
ZERO_STRUCT(r.in.req.req1.info->guid1);
ZERO_ARRAY(r.in.req.req1.info->unknown3);
- r.in.req.req1.info->nc_dn = priv->domain_obj_dn;
+ r.in.req.req1.info->nc_dn = priv->domain_obj_dn?priv->domain_obj_dn:"";
r.in.req.req1.guid1 = priv->dcinfo.ntds_guid;
r.in.req.req1.string1 = NULL;
r.in.req.req1.unknown1 = 16;
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 66cc8a5d26..a599dabe15 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -70,7 +70,7 @@ static BOOL test_Shutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct samr_Shutdown r;
- if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("samr_Shutdown disabled - enable dangerous tests to use\n");
return True;
}
@@ -96,7 +96,7 @@ static BOOL test_SetDsrmPassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct samr_String string;
struct samr_Password hash;
- if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("samr_SetDsrmPassword disabled - enable dangerous tests to use\n");
return True;
}
@@ -2176,7 +2176,7 @@ static BOOL test_EnumDomainUsers_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
#define ASYNC_COUNT 100
struct rpc_request *req[ASYNC_COUNT];
- if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("samr async test disabled - enable dangerous tests to use\n");
return True;
}
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index e15ee23c37..14c18df370 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -770,7 +770,7 @@ BOOL torture_rpc_winreg(void)
return False;
}
- if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("winreg_InitiateShutdown disabled - enable dangerous tests to use\n");
} else {
ret &= test_InitiateSystemShutdown(p, mem_ctx, "spottyfood", 30);