r4422: make lp_set_cmdline("torture:dangerous", "Yes") a bool parameter
authorStefan Metzmacher <metze@samba.org>
Fri, 31 Dec 2004 01:02:22 +0000 (01:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:47 +0000 (13:07 -0500)
metze

source/torture/raw/setfileinfo.c
source/torture/rpc/drsuapi.c
source/torture/rpc/samr.c
source/torture/rpc/winreg.c
source/torture/torture.c

index 298ccf674b5bb9d8d3fd4695a162de8b6733f90f..53fbf5a0f3de3ead017dd392007ca5ae721df90f 100644 (file)
@@ -527,7 +527,7 @@ BOOL torture_raw_sfileinfo_bug(void)
        NTSTATUS status;
        int fnum;
 
-       if (lp_parm_int(-1, "torture", "dangerous") != 1) {
+       if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
                printf("torture_raw_sfileinfo_bug disabled - enable dangerous tests to use\n");
                return True;
        }
index f44bf9756827549c8c5cd8fffaae3fd720025b88..2e3fe87bb4d1347c3c077d98ed66a89c18013da7 100644 (file)
@@ -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;
index 66cc8a5d2659166fe42ad31a1e40775598d20e19..a599dabe154f7501d0620cdf6f6c0c3cac216c8f 100644 (file)
@@ -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;
        }
index e15ee23c37e2270ff100c1b2830e90da34d5b86c..14c18df370cdbb7341280cd179b54f94e6d09ca1 100644 (file)
@@ -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);
index c4dde458474619506dc0d68178107b187451d118..c5b91f36803773cec89379d80ba2e7674c710779 100644 (file)
@@ -2697,7 +2697,7 @@ static BOOL is_binding_string(const char *binding_string)
                        parse_dns(poptGetOptArg(pc));
                        break;
                case OPT_DANGEROUS:
-                       lp_set_cmdline("torture:dangerous", "1");
+                       lp_set_cmdline("torture:dangerous", "Yes");
                        break;
                default:
                        d_printf("Invalid option %s: %s\n",