diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-29 18:00:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:07:31 -0500 |
commit | 60a1046c5c5783799bd64fe18e03534670f83d82 (patch) | |
tree | 48f788a6a6fbed5af0a3f3eea1e4373d70b03e5b /source4/torture/rpc | |
parent | 98038f71a7b072912c974d131012335ca22c5259 (diff) | |
download | samba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.gz samba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.bz2 samba-60a1046c5c5783799bd64fe18e03534670f83d82.zip |
r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/bench.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/countcalls.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi.c | 16 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi_cracknames.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/dssync.c | 28 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 16 | ||||
-rw-r--r-- | source4/torture/rpc/schannel.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/testjoin.c | 6 |
10 files changed, 45 insertions, 45 deletions
diff --git a/source4/torture/rpc/bench.c b/source4/torture/rpc/bench.c index 7f71723e6d..9880393cdd 100644 --- a/source4/torture/rpc/bench.c +++ b/source4/torture/rpc/bench.c @@ -72,7 +72,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { struct timeval tv = timeval_current(); BOOL ret = True; - int timelimit = lp_parm_int(NULL, "torture", "timelimit", 10); + int timelimit = lp_parm_int(global_loadparm, NULL, "torture", "timelimit", 10); int count=0; printf("Running for %d seconds\n", timelimit); @@ -82,7 +82,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) talloc_free(tmp_ctx); count++; if (count % 50 == 0) { - if (lp_parm_bool(NULL, "torture", "progress", true)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) { printf("%.1f queries per second \r", count / timeval_elapsed(&tv)); } diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c index 0d3df0ffb3..eba20e6361 100644 --- a/source4/torture/rpc/countcalls.c +++ b/source4/torture/rpc/countcalls.c @@ -111,7 +111,7 @@ BOOL torture_rpc_countcalls(struct torture_context *torture) if (!mem_ctx) { return False; } - iface_name = lp_parm_string(NULL, "countcalls", "interface"); + iface_name = lp_parm_string(global_loadparm, NULL, "countcalls", "interface"); if (iface_name != NULL) { iface = ndr_table_by_name(iface_name); if (!iface) { diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index 42c0cc8bda..770f73871a 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -307,7 +307,7 @@ static BOOL test_DsReplicaGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } }; - if (lp_parm_bool(NULL, "torture", "samba4", False)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) { printf("skipping DsReplicaGetInfo test against Samba4\n"); return True; } @@ -380,12 +380,12 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } }; - if (!lp_parm_bool(NULL, "torture", "dangerous", False)) { + if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", False)) { printf("DsReplicaSync disabled - enable dangerous tests to use\n"); return True; } - if (lp_parm_bool(NULL, "torture", "samba4", False)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) { printf("skipping DsReplicaSync test against Samba4\n"); return True; } @@ -448,7 +448,7 @@ static BOOL test_DsReplicaUpdateRefs(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } }; - if (lp_parm_bool(NULL, "torture", "samba4", False)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) { printf("skipping DsReplicaUpdateRefs test against Samba4\n"); return True; } @@ -515,7 +515,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } }; - if (lp_parm_bool(NULL, "torture", "samba4", False)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) { printf("skipping DsGetNCChanges test against Samba4\n"); return True; } @@ -544,7 +544,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.req.req5.highwatermark.highest_usn = 0; r.in.req.req5.uptodateness_vector = NULL; r.in.req.req5.replica_flags = 0; - if (lp_parm_bool(NULL, "drsuapi","compression", False)) { + if (lp_parm_bool(global_loadparm, NULL, "drsuapi","compression", False)) { r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES; } r.in.req.req5.max_object_count = 0; @@ -566,10 +566,10 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.req.req8.highwatermark.highest_usn = 0; r.in.req.req8.uptodateness_vector = NULL; r.in.req.req8.replica_flags = 0; - if (lp_parm_bool(NULL,"drsuapi","compression",False)) { + if (lp_parm_bool(global_loadparm, NULL,"drsuapi","compression",False)) { r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES; } - if (lp_parm_bool(NULL,"drsuapi","neighbour_writeable",True)) { + if (lp_parm_bool(global_loadparm, NULL,"drsuapi","neighbour_writeable",True)) { r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE; } r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c index 153d41a8e9..d3530dae19 100644 --- a/source4/torture/rpc/drsuapi_cracknames.c +++ b/source4/torture/rpc/drsuapi_cracknames.c @@ -589,7 +589,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(NULL, "torture", "samba4", False) + .skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False) }, { .format_offered = DRSUAPI_DS_NAME_FORMAT_GUID, diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 79063e86da..347b1a5bc7 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -84,7 +84,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx) struct DsSyncTest *ctx; struct drsuapi_DsBindInfo28 *our_bind_info28; struct drsuapi_DsBindInfoCtr *our_bind_info_ctr; - const char *binding = lp_parm_string(NULL, "torture", "binding"); + const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding"); ctx = talloc_zero(mem_ctx, struct DsSyncTest); if (!ctx) return NULL; @@ -149,7 +149,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx) our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3; our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7; our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT; - if (lp_parm_bool(NULL, "dssync", "xpress", false)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "xpress", false)) { our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS; } our_bind_info28->site_guid = GUID_zero(); @@ -420,11 +420,11 @@ static void test_analyse_objects(struct DsSyncTest *ctx, static uint32_t object_id; const char *save_values_dir; - if (!lp_parm_bool(NULL,"dssync","print_pwd_blobs", false)) { + if (!lp_parm_bool(global_loadparm, NULL,"dssync","print_pwd_blobs", false)) { return; } - save_values_dir = lp_parm_string(NULL, "dssync", "save_pwd_blobs_dir"); + save_values_dir = lp_parm_string(global_loadparm, NULL, "dssync", "save_pwd_blobs_dir"); for (; cur; cur = cur->next_object) { const char *dn; @@ -560,17 +560,17 @@ static BOOL test_FetchData(struct DsSyncTest *ctx) ZERO_STRUCT(null_guid); ZERO_STRUCT(null_sid); - partition = lp_parm_string(NULL, "dssync", "partition"); + partition = lp_parm_string(global_loadparm, NULL, "dssync", "partition"); if (partition == NULL) { partition = ctx->domain_dn; printf("dssync:partition not specified, defaulting to %s.\n", ctx->domain_dn); } - highest_usn = lp_parm_int(NULL, "dssync", "highest_usn", 0); + highest_usn = lp_parm_int(global_loadparm, NULL, "dssync", "highest_usn", 0); - array[0].level = lp_parm_int(NULL, "dssync", "get_nc_changes_level", array[0].level); + array[0].level = lp_parm_int(global_loadparm, NULL, "dssync", "get_nc_changes_level", array[0].level); - if (lp_parm_bool(NULL, "dssync", "print_pwd_blobs", false)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "print_pwd_blobs", false)) { const struct samr_Password *nthash; nthash = cli_credentials_get_nt_hash(ctx->new_dc.credentials, ctx); if (nthash) { @@ -606,10 +606,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx) r.in.req.req5.highwatermark.highest_usn = highest_usn; r.in.req.req5.uptodateness_vector = NULL; r.in.req.req5.replica_flags = 0; - if (lp_parm_bool(NULL, "dssync", "compression", false)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) { r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES; } - if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) { r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE; } r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP @@ -637,10 +637,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx) r.in.req.req8.highwatermark.highest_usn = highest_usn; r.in.req.req8.uptodateness_vector = NULL; r.in.req.req8.replica_flags = 0; - if (lp_parm_bool(NULL, "dssync", "compression", false)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) { r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES; } - if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) { + if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) { r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE; } r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP @@ -760,8 +760,8 @@ static BOOL test_FetchNT4Data(struct DsSyncTest *ctx) r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle; r.in.level = 1; - r.in.req.req1.unknown1 = lp_parm_int(NULL, "dssync", "nt4-1", 3); - r.in.req.req1.unknown2 = lp_parm_int(NULL, "dssync", "nt4-2", 0x00004000); + r.in.req.req1.unknown1 = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-1", 3); + r.in.req.req1.unknown2 = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-2", 0x00004000); while (1) { r.in.req.req1.length = cookie.length; diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 00fc30414d..0a78e9d76d 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -1312,7 +1312,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p, NTSTATUS status; struct lsa_QuerySecurity r; - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping QuerySecurity test against Samba4\n"); return True; } @@ -1551,7 +1551,7 @@ static BOOL test_QueryForestTrustInformation(struct dcerpc_pipe *p, printf("\nTesting lsaRQueryForestTrustInformation\n"); - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping QueryForestTrustInformation against Samba4\n"); return True; } @@ -1918,7 +1918,7 @@ static BOOL test_QueryDomainInfoPolicy(struct dcerpc_pipe *p, NTSTATUS status; int i; BOOL ret = True; - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping QueryDomainInformationPolicy test against Samba4\n"); return True; } @@ -1954,7 +1954,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p, BOOL ret = True; printf("\nTesting QueryInfoPolicy\n"); - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping QueryInfoPolicy against Samba4\n"); return True; } @@ -1985,7 +1985,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p, } break; default: - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { /* Other levels not implemented yet */ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) { printf("QueryInfoPolicy failed - %s\n", nt_errstr(status)); @@ -2056,7 +2056,7 @@ static BOOL test_QueryInfoPolicy2(struct dcerpc_pipe *p, } break; default: - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { /* Other levels not implemented yet */ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) { printf("QueryInfoPolicy2 failed - %s\n", nt_errstr(status)); diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 75a7d760d9..92f8778df6 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -1230,7 +1230,7 @@ static BOOL test_join3(TALLOC_CTX *mem_ctx, struct cli_credentials *wks_creds; status = smbcli_full_connection(mem_ctx, &cli, - lp_parm_string(NULL, "torture", "host"), + lp_parm_string(global_loadparm, NULL, "torture", "host"), "IPC$", NULL, smb_creds, NULL); if (!NT_STATUS_IS_OK(status)) { d_printf("smbcli_full_connection failed: %s\n", diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 2a70a5b71f..af1ff44a43 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -84,7 +84,7 @@ static BOOL test_Shutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, NTSTATUS status; struct samr_Shutdown r; - if (!lp_parm_bool(NULL, "torture", "dangerous", false)) { + if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) { printf("samr_Shutdown disabled - enable dangerous tests to use\n"); return True; } @@ -110,7 +110,7 @@ static BOOL test_SetDsrmPassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct lsa_String string; struct samr_Password hash; - if (!lp_parm_bool(NULL, "torture", "dangerous", false)) { + if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) { printf("samr_SetDsrmPassword disabled - enable dangerous tests to use\n"); return True; } @@ -159,7 +159,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, s.in.sec_info = 7; s.in.sdbuf = r.out.sdbuf; - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping SetSecurity test against Samba4\n"); return True; } @@ -415,7 +415,7 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, TEST_USERINFO_INT(21, logon_hours.bits[3], 21, logon_hours.bits[3], 4, SAMR_FIELD_LOGON_HOURS); - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping Set Account Flag tests against Samba4\n"); return ret; } @@ -2121,7 +2121,7 @@ static BOOL test_alias_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping MultipleMembers Alias tests against Samba4\n"); return ret; } @@ -3180,7 +3180,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_bool(NULL, "torture", "dangerous", false)) { + if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) { printf("samr async test disabled - enable dangerous tests to use\n"); return True; } @@ -4067,7 +4067,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping SetMemberAttributesOfGroup test against Samba4\n"); } else { /* this one is quite strange. I am using random inputs in the @@ -4256,7 +4256,7 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret &= test_QueryDisplayInfo3(p, mem_ctx, &domain_handle); ret &= test_QueryDisplayInfo_continue(p, mem_ctx, &domain_handle); - if (lp_parm_bool(NULL, "torture", "samba4", false)) { + if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) { printf("skipping GetDisplayEnumerationIndex test against Samba4\n"); } else { ret &= test_GetDisplayEnumerationIndex(p, mem_ctx, &domain_handle); diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index cb70582615..69e18a40cd 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -233,7 +233,7 @@ static bool test_schannel(struct torture_context *tctx, { struct test_join *join_ctx; NTSTATUS status; - const char *binding = lp_parm_string(NULL, "torture", "binding"); + const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding"); struct dcerpc_binding *b; struct dcerpc_pipe *p = NULL; struct dcerpc_pipe *p_netlogon = NULL; diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 79a1b87376..b7e3b488c9 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -126,7 +126,7 @@ struct test_join *torture_create_testuser(struct torture_context *torture, int policy_min_pw_len = 0; struct test_join *join; char *random_pw; - const char *dc_binding = lp_parm_string(NULL, "torture", "dc_binding"); + const char *dc_binding = lp_parm_string(global_loadparm, NULL, "torture", "dc_binding"); join = talloc(NULL, struct test_join); if (join == NULL) { @@ -328,9 +328,9 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name, tj->libnet_r = libnet_r; libnet_ctx->cred = cmdline_credentials; - libnet_r->in.binding = lp_parm_string(NULL, "torture", "binding"); + libnet_r->in.binding = lp_parm_string(global_loadparm, NULL, "torture", "binding"); if (!libnet_r->in.binding) { - libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(NULL, "torture", "host")); + libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(global_loadparm, NULL, "torture", "host")); } libnet_r->in.level = LIBNET_JOINDOMAIN_SPECIFIED; libnet_r->in.netbios_name = machine_name; |