diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-07-16 14:32:42 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-07-16 18:24:27 +1000 |
commit | 6b266b85cf34145ac1f03d8f787b81121e4ec92b (patch) | |
tree | 9f6faebdcf58c73e0297bfdf3b905ef256f8e478 /source4/torture/rpc | |
parent | e4c35c5a09dd66c9280caa39130b7e3b941b7e51 (diff) | |
download | samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.gz samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.bz2 samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.zip |
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/countcalls.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/dssync.c | 36 | ||||
-rw-r--r-- | source4/torture/rpc/frsapi.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/join.c | 20 | ||||
-rw-r--r-- | source4/torture/rpc/mgmt.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/netlogon.c | 42 | ||||
-rw-r--r-- | source4/torture/rpc/remote_pac.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 80 | ||||
-rw-r--r-- | source4/torture/rpc/samlogon.c | 10 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/samr_accessmask.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/samsync.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/scanner.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/schannel.c | 16 | ||||
-rw-r--r-- | source4/torture/rpc/session_key.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/spoolss.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/spoolss_access.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/spoolss_notify.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/testjoin.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/wkssvc.c | 20 |
21 files changed, 154 insertions, 154 deletions
diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c index 7d3c9d7b86..7f3735105c 100644 --- a/source4/torture/rpc/countcalls.c +++ b/source4/torture/rpc/countcalls.c @@ -101,7 +101,7 @@ bool torture_rpc_countcalls(struct torture_context *torture) const char *iface_name; bool ret = true; const struct ndr_interface_list *l; - iface_name = lp_parm_string(torture->lp_ctx, NULL, "countcalls", "interface"); + iface_name = lpcfg_parm_string(torture->lp_ctx, 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 105af1cab2..49202a6382 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -575,7 +575,7 @@ static bool test_DsGetNCChanges(struct torture_context *tctx, 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(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) { r.in.req->req5.replica_flags |= DRSUAPI_DRS_USE_COMPRESSION; } r.in.req->req5.max_object_count = 0; @@ -598,10 +598,10 @@ static bool test_DsGetNCChanges(struct torture_context *tctx, 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(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) { r.in.req->req8.replica_flags |= DRSUAPI_DRS_USE_COMPRESSION; } - if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "neighbour_writeable", true)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "neighbour_writeable", true)) { r.in.req->req8.replica_flags |= DRSUAPI_DRS_WRIT_REP; } r.in.req->req8.replica_flags |= DRSUAPI_DRS_INIT_SYNC diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 49400bc105..5e5929f734 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -104,7 +104,7 @@ static struct DsSyncTest *test_create_context(struct torture_context *tctx) make_nbt_name_server(&name, ctx->drsuapi_binding->host); /* do an initial name resolution to find its IP */ - status = resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, + status = resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &ctx->dest_address, tctx->ev); if (!NT_STATUS_IS_OK(status)) { printf("Failed to resolve %s - %s\n", @@ -164,7 +164,7 @@ static struct DsSyncTest *test_create_context(struct torture_context *tctx) 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(tctx->lp_ctx, NULL, "dssync", "xpress", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "xpress", false)) { our_bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS; } our_bind_info28->site_guid = GUID_zero(); @@ -272,7 +272,7 @@ static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx, ldb_set_modules_dir(ldb, talloc_asprintf(ldb, "%s/ldb", - lp_modulesdir(tctx->lp_ctx))); + lpcfg_modulesdir(tctx->lp_ctx))); if (ldb_set_opaque(ldb, "credentials", credentials)) { talloc_free(ldb); @@ -311,11 +311,11 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) ret2 = tsocket_address_inet_from_strings(tctx, "ip", ctx->dest_address, - lp_cldap_port(tctx->lp_ctx), + lpcfg_cldap_port(tctx->lp_ctx), &dest_addr); if (ret2 != 0) { printf("failed to create tsocket_address for '%s' port %u - %s\n", - ctx->drsuapi_binding->host, lp_cldap_port(tctx->lp_ctx), + ctx->drsuapi_binding->host, lpcfg_cldap_port(tctx->lp_ctx), strerror(errno)); return false; } @@ -337,7 +337,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) r.in.req->req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS; r.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT; r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779; - names[0].str = talloc_asprintf(ctx, "%s\\", lp_workgroup(tctx->lp_ctx)); + names[0].str = talloc_asprintf(ctx, "%s\\", lpcfg_workgroup(tctx->lp_ctx)); r.out.level_out = &level_out; r.out.ctr = &ctr; @@ -600,12 +600,12 @@ static bool test_analyse_objects(struct torture_context *tctx, talloc_free(search_req); } - if (!lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "print_pwd_blobs", false)) { + if (!lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "print_pwd_blobs", false)) { talloc_free(objs); return true; } - save_values_dir = lp_parm_string(tctx->lp_ctx, NULL, "dssync", "save_pwd_blobs_dir"); + save_values_dir = lpcfg_parm_string(tctx->lp_ctx, NULL, "dssync", "save_pwd_blobs_dir"); for (cur = first_object; cur; cur = cur->next_object) { const char *dn; @@ -773,17 +773,17 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx) ZERO_STRUCT(null_guid); ZERO_STRUCT(null_sid); - partition = lp_parm_string(tctx->lp_ctx, NULL, "dssync", "partition"); + partition = lpcfg_parm_string(tctx->lp_ctx, 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(tctx->lp_ctx, NULL, "dssync", "highest_usn", 0); + highest_usn = lpcfg_parm_int(tctx->lp_ctx, NULL, "dssync", "highest_usn", 0); - array[0].level = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "get_nc_changes_level", array[0].level); + array[0].level = lpcfg_parm_int(tctx->lp_ctx, NULL, "dssync", "get_nc_changes_level", array[0].level); - if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "print_pwd_blobs", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "print_pwd_blobs", false)) { const struct samr_Password *nthash; nthash = cli_credentials_get_nt_hash(ctx->new_dc.credentials, ctx); if (nthash) { @@ -819,10 +819,10 @@ static bool test_FetchData(struct torture_context *tctx, 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(tctx->lp_ctx, NULL, "dssync", "compression", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) { r.in.req->req5.replica_flags |= DRSUAPI_DRS_USE_COMPRESSION; } - if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) { r.in.req->req5.replica_flags |= DRSUAPI_DRS_WRIT_REP; } r.in.req->req5.replica_flags |= DRSUAPI_DRS_INIT_SYNC @@ -851,10 +851,10 @@ static bool test_FetchData(struct torture_context *tctx, 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(tctx->lp_ctx, NULL, "dssync", "compression", false)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) { r.in.req->req8.replica_flags |= DRSUAPI_DRS_USE_COMPRESSION; } - if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) { + if (lpcfg_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) { r.in.req->req8.replica_flags |= DRSUAPI_DRS_WRIT_REP; } r.in.req->req8.replica_flags |= DRSUAPI_DRS_INIT_SYNC @@ -996,11 +996,11 @@ static bool test_FetchNT4Data(struct torture_context *tctx, r.out.info = &info; r.out.level_out = &level_out; - req.req1.flags = lp_parm_int(tctx->lp_ctx, NULL, + req.req1.flags = lpcfg_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4changelog_flags", DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG | DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS); - req.req1.preferred_maximum_length = lp_parm_int(tctx->lp_ctx, NULL, + req.req1.preferred_maximum_length = lpcfg_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4changelog_preferred_len", 0x00004000); diff --git a/source4/torture/rpc/frsapi.c b/source4/torture/rpc/frsapi.c index e56dd5822b..bb2c9d8a1e 100644 --- a/source4/torture/rpc/frsapi.c +++ b/source4/torture/rpc/frsapi.c @@ -194,7 +194,7 @@ static bool test_ForceReplication(struct torture_context *tctx, r.in.replica_set_guid = NULL; r.in.connection_guid = NULL; - r.in.replica_set_name = lp_dnsdomain(tctx->lp_ctx); + r.in.replica_set_name = lpcfg_dnsdomain(tctx->lp_ctx); r.in.partner_dns_name = dcerpc_server_name(p); torture_assert_ntstatus_ok(tctx, diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c index 09519d03a5..6e0afcac28 100644 --- a/source4/torture/rpc/join.c +++ b/source4/torture/rpc/join.c @@ -31,17 +31,17 @@ bool torture_rpc_join(struct torture_context *torture) return false; } - lp_smbcli_options(torture->lp_ctx, &options); - lp_smbcli_session_options(torture->lp_ctx, &session_options); + lpcfg_smbcli_options(torture->lp_ctx, &options); + lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); status = smbcli_full_connection(tj, &cli, host, - lp_smb_ports(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), + lpcfg_socket_options(torture->lp_ctx), machine_account, - lp_resolve_context(torture->lp_ctx), + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n", TORTURE_NETBIOS_NAME)); @@ -63,13 +63,13 @@ bool torture_rpc_join(struct torture_context *torture) } status = smbcli_full_connection(tj, &cli, host, - lp_smb_ports(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), + lpcfg_socket_options(torture->lp_ctx), machine_account, - lp_resolve_context(torture->lp_ctx), + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n", TORTURE_NETBIOS_NAME)); diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c index fa30ee154f..1b60832568 100644 --- a/source4/torture/rpc/mgmt.c +++ b/source4/torture/rpc/mgmt.c @@ -230,7 +230,7 @@ bool torture_rpc_mgmt(struct torture_context *torture) continue; } - lp_set_cmdline(torture->lp_ctx, "torture:binding", dcerpc_binding_string(loop_ctx, b)); + lpcfg_set_cmdline(torture->lp_ctx, "torture:binding", dcerpc_binding_string(loop_ctx, b)); status = torture_rpc_connection(torture, &p, &ndr_table_mgmt); if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 32c16f94e6..1ebce03d80 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -698,11 +698,11 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context int i; struct dcerpc_binding_handle *b = p->binding_handle; int flags = CLI_CRED_NTLM_AUTH; - if (lp_client_lanman_auth(tctx->lp_ctx)) { + if (lpcfg_client_lanman_auth(tctx->lp_ctx)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth(tctx->lp_ctx)) { + if (lpcfg_client_ntlmv2_auth(tctx->lp_ctx)) { flags |= CLI_CRED_NTLMv2_AUTH; } @@ -1602,7 +1602,7 @@ static bool test_GetDcName(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); - r.in.domainname = lp_workgroup(tctx->lp_ctx); + r.in.domainname = lpcfg_workgroup(tctx->lp_ctx); r.out.dcname = &dcname; torture_assert_ntstatus_ok(tctx, dcerpc_netr_GetDcName_r(b, tctx, &r), @@ -1787,7 +1787,7 @@ static bool test_GetAnyDCName(struct torture_context *tctx, const char *dcname = NULL; struct dcerpc_binding_handle *b = p->binding_handle; - r.in.domainname = lp_workgroup(tctx->lp_ctx); + r.in.domainname = lpcfg_workgroup(tctx->lp_ctx); r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); r.out.dcname = &dcname; @@ -1839,7 +1839,7 @@ static bool test_LogonControl2(struct torture_context *tctx, int i; struct dcerpc_binding_handle *b = p->binding_handle; - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); @@ -1857,7 +1857,7 @@ static bool test_LogonControl2(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "LogonControl"); } - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.function_code = NETLOGON_CONTROL_TC_QUERY; r.in.data = &data; @@ -1872,7 +1872,7 @@ static bool test_LogonControl2(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "LogonControl"); } - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.function_code = NETLOGON_CONTROL_TRANSPORT_NOTIFY; r.in.data = &data; @@ -1991,7 +1991,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx, int i; struct dcerpc_binding_handle *b = p->binding_handle; - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); @@ -2009,7 +2009,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "LogonControl"); } - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.function_code = NETLOGON_CONTROL_TC_QUERY; r.in.data = &data; @@ -2024,7 +2024,7 @@ static bool test_LogonControl2Ex(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "LogonControl"); } - data.domain = lp_workgroup(tctx->lp_ctx); + data.domain = lpcfg_workgroup(tctx->lp_ctx); r.in.function_code = NETLOGON_CONTROL_TRANSPORT_NOTIFY; r.in.data = &data; @@ -2249,7 +2249,7 @@ static bool test_netr_DsRGetDCName(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); - r.in.domain_name = lp_dnsdomain(tctx->lp_ctx); + r.in.domain_name = lpcfg_dnsdomain(tctx->lp_ctx); r.in.domain_guid = NULL; r.in.site_guid = NULL; r.in.flags = DS_RETURN_DNS_NAME; @@ -2259,7 +2259,7 @@ static bool test_netr_DsRGetDCName(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "DsRGetDCName"); torture_assert_werr_ok(tctx, r.out.result, "DsRGetDCName"); - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); status = dcerpc_netr_DsRGetDCName_r(b, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "DsRGetDCName"); @@ -2282,7 +2282,7 @@ static bool test_netr_DsRGetDCNameEx(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); - r.in.domain_name = lp_dnsdomain(tctx->lp_ctx); + r.in.domain_name = lpcfg_dnsdomain(tctx->lp_ctx); r.in.domain_guid = NULL; r.in.site_name = NULL; r.in.flags = DS_RETURN_DNS_NAME; @@ -2292,7 +2292,7 @@ static bool test_netr_DsRGetDCNameEx(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx"); torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx"); - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); status = dcerpc_netr_DsRGetDCNameEx_r(b, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx"); @@ -2325,7 +2325,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx, r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); r.in.client_account = NULL; r.in.mask = 0x00000000; - r.in.domain_name = lp_dnsdomain(tctx->lp_ctx); + r.in.domain_name = lpcfg_dnsdomain(tctx->lp_ctx); r.in.domain_guid = NULL; r.in.site_name = NULL; r.in.flags = DS_RETURN_DNS_NAME; @@ -2337,7 +2337,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx2"); torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx2"); - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); status = dcerpc_netr_DsRGetDCNameEx2_r(b, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx2"); @@ -2875,7 +2875,7 @@ static bool test_GetDomainInfo(struct torture_context *tctx, ZERO_STRUCT(q1); q1.dns_hostname = talloc_asprintf(tctx, "%s.%s", TEST_MACHINE_NAME, - lp_dnsdomain(tctx->lp_ctx)); + lpcfg_dnsdomain(tctx->lp_ctx)); q1.sitename = "Default-First-Site-Name"; q1.os_version.os = &os; q1.os_name.string = talloc_asprintf(tctx, @@ -2988,7 +2988,7 @@ static bool test_GetDomainInfo(struct torture_context *tctx, /* Change also the DNS hostname to test differences in behaviour */ talloc_free(discard_const_p(char, q1.dns_hostname)); q1.dns_hostname = talloc_asprintf(tctx, "%s2.%s", TEST_MACHINE_NAME, - lp_dnsdomain(tctx->lp_ctx)); + lpcfg_dnsdomain(tctx->lp_ctx)); /* The workstation handles the "servicePrincipalName" and DNS hostname updates */ @@ -3062,7 +3062,7 @@ static bool test_GetDomainInfo(struct torture_context *tctx, /* Change also the DNS hostname to test differences in behaviour */ talloc_free(discard_const_p(char, q1.dns_hostname)); q1.dns_hostname = talloc_asprintf(tctx, "%s2.%s", TEST_MACHINE_NAME, - lp_dnsdomain(tctx->lp_ctx)); + lpcfg_dnsdomain(tctx->lp_ctx)); /* Wipe out the osVersion, and prove which values still 'stick' */ q1.os_version.os = NULL; @@ -3136,7 +3136,7 @@ static bool test_GetDomainInfo(struct torture_context *tctx, /* Put the DNS hostname back */ talloc_free(discard_const_p(char, q1.dns_hostname)); q1.dns_hostname = talloc_asprintf(tctx, "%s.%s", TEST_MACHINE_NAME, - lp_dnsdomain(tctx->lp_ctx)); + lpcfg_dnsdomain(tctx->lp_ctx)); /* The workstation handles the "servicePrincipalName" and DNS hostname updates */ @@ -3251,7 +3251,7 @@ static bool test_GetDomainInfo_async(struct torture_context *tctx, ZERO_STRUCT(q1); q1.dns_hostname = talloc_asprintf(tctx, "%s.%s", TEST_MACHINE_NAME, - lp_dnsdomain(tctx->lp_ctx)); + lpcfg_dnsdomain(tctx->lp_ctx)); q1.sitename = "Default-First-Site-Name"; q1.os_name.string = "UNIX/Linux or similar"; diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c index 8e610a14bf..28ab750e9c 100644 --- a/source4/torture/rpc/remote_pac.c +++ b/source4/torture/rpc/remote_pac.c @@ -86,7 +86,7 @@ static bool test_PACVerify(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "torture_temp_dir failed"); status = gensec_client_start(tctx, &gensec_client_context, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx)); + lpcfg_gensec_settings(tctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "gensec_client_start (client) failed"); status = gensec_set_target_hostname(gensec_client_context, test_machine_name); @@ -98,7 +98,7 @@ static bool test_PACVerify(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "gensec_start_mech_by_sasl_name (client) failed"); status = gensec_server_start(tctx, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx), + lpcfg_gensec_settings(tctx, tctx->lp_ctx), NULL, &gensec_server_context); torture_assert_ntstatus_ok(tctx, status, "gensec_server_start (server) failed"); @@ -395,7 +395,7 @@ static bool test_S2U4Self(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "torture_temp_dir failed"); status = gensec_client_start(tctx, &gensec_client_context, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx)); + lpcfg_gensec_settings(tctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "gensec_client_start (client) failed"); status = gensec_set_target_hostname(gensec_client_context, test_machine_name); @@ -407,7 +407,7 @@ static bool test_S2U4Self(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "gensec_start_mech_by_sasl_name (client) failed"); status = gensec_server_start(tctx, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx), + lpcfg_gensec_settings(tctx, tctx->lp_ctx), NULL, &gensec_server_context); torture_assert_ntstatus_ok(tctx, status, "gensec_server_start (server) failed"); @@ -450,7 +450,7 @@ static bool test_S2U4Self(struct torture_context *tctx, cli_credentials_set_impersonate_principal(credentials, cli_credentials_get_principal(cmdline_credentials, tmp_ctx)); status = gensec_client_start(tctx, &gensec_client_context, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx)); + lpcfg_gensec_settings(tctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "gensec_client_start (client) failed"); status = gensec_set_target_hostname(gensec_client_context, test_machine_name); @@ -463,7 +463,7 @@ static bool test_S2U4Self(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "gensec_start_mech_by_sasl_name (client) failed"); status = gensec_server_start(tctx, tctx->ev, - lp_gensec_settings(tctx, tctx->lp_ctx), + lpcfg_gensec_settings(tctx, tctx->lp_ctx), NULL, &gensec_server_context); torture_assert_ntstatus_ok(tctx, status, "gensec_server_start (server) failed"); diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index d09e80283a..06b5c8c0ef 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -73,18 +73,18 @@ bool torture_bind_authcontext(struct torture_context *torture) return false; } - lp_smbcli_options(torture->lp_ctx, &options); - lp_smbcli_session_options(torture->lp_ctx, &session_options); + lpcfg_smbcli_options(torture->lp_ctx, &options); + lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); status = smbcli_full_connection(mem_ctx, &cli, torture_setting_string(torture, "host", NULL), - lp_smb_ports(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), + lpcfg_socket_options(torture->lp_ctx), cmdline_credentials, - lp_resolve_context(torture->lp_ctx), + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { torture_comment(torture, "smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -162,7 +162,7 @@ bool torture_bind_authcontext(struct torture_context *torture) setup.in.capabilities = cli->transport->negotiate.capabilities; setup.in.workgroup = ""; setup.in.credentials = anon_creds; - setup.in.gensec_settings = lp_gensec_settings(torture, torture->lp_ctx); + setup.in.gensec_settings = lpcfg_gensec_settings(torture, torture->lp_ctx); status = smb_composite_sesssetup(session2, &setup); if (!NT_STATUS_IS_OK(status)) { @@ -237,7 +237,7 @@ static bool bindtest(struct torture_context *tctx, } status = dcerpc_bind_auth(lsa_pipe, &ndr_table_lsarpc, - credentials, lp_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), auth_type, auth_level, + credentials, lpcfg_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), auth_type, auth_level, NULL); if (!NT_STATUS_IS_OK(status)) { torture_comment(tctx, "dcerpc_bind_auth failed: %s\n", nt_errstr(status)); @@ -322,18 +322,18 @@ static bool torture_bind_samba3(struct torture_context *torture) return false; } - lp_smbcli_options(torture->lp_ctx, &options); - lp_smbcli_session_options(torture->lp_ctx, &session_options); + lpcfg_smbcli_options(torture->lp_ctx, &options); + lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); status = smbcli_full_connection(mem_ctx, &cli, torture_setting_string(torture, "host", NULL), - lp_smb_ports(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), + lpcfg_socket_options(torture->lp_ctx), cmdline_credentials, - lp_resolve_context(torture->lp_ctx), + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { torture_comment(torture, "smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -405,7 +405,7 @@ static bool get_usr_handle(struct torture_context *tctx, if (admin_creds != NULL) { torture_assert_ntstatus_ok(tctx, dcerpc_bind_auth(samr_pipe, &ndr_table_samr, - admin_creds, lp_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), auth_type, auth_level, + admin_creds, lpcfg_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), auth_type, auth_level, NULL), "dcerpc_bind_auth failed"); } else { @@ -1085,7 +1085,7 @@ static bool schan(struct torture_context *tctx, #if 1 net_pipe->conn->flags |= (DCERPC_SIGN | DCERPC_SEAL); status = dcerpc_bind_auth(net_pipe, &ndr_table_netlogon, - wks_creds, lp_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), DCERPC_AUTH_TYPE_SCHANNEL, + wks_creds, lpcfg_gensec_settings(tctx->lp_ctx, tctx->lp_ctx), DCERPC_AUTH_TYPE_SCHANNEL, DCERPC_AUTH_LEVEL_PRIVACY, NULL); #else @@ -1324,18 +1324,18 @@ static bool torture_netlogon_samba3(struct torture_context *torture) goto done; } - lp_smbcli_options(torture->lp_ctx, &options); - lp_smbcli_session_options(torture->lp_ctx, &session_options); + lpcfg_smbcli_options(torture->lp_ctx, &options); + lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); status = smbcli_full_connection(mem_ctx, &cli, torture_setting_string(torture, "host", NULL), - lp_smb_ports(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), + lpcfg_socket_options(torture->lp_ctx), anon_creds, - lp_resolve_context(torture->lp_ctx), + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { torture_comment(torture, "smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1415,16 +1415,16 @@ static bool test_join3(struct torture_context *tctx, struct smbcli_options options; struct smbcli_session_options session_options; - lp_smbcli_options(tctx->lp_ctx, &options); - lp_smbcli_session_options(tctx->lp_ctx, &session_options); + lpcfg_smbcli_options(tctx->lp_ctx, &options); + lpcfg_smbcli_session_options(tctx->lp_ctx, &session_options); status = smbcli_full_connection(tctx, &cli, torture_setting_string(tctx, "host", NULL), - lp_smb_ports(tctx->lp_ctx), - "IPC$", NULL, lp_socket_options(tctx->lp_ctx), - smb_creds, lp_resolve_context(tctx->lp_ctx), + lpcfg_smb_ports(tctx->lp_ctx), + "IPC$", NULL, lpcfg_socket_options(tctx->lp_ctx), + smb_creds, lpcfg_resolve_context(tctx->lp_ctx), tctx->ev, &options, &session_options, - lp_gensec_settings(tctx, tctx->lp_ctx)); + lpcfg_gensec_settings(tctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "smbcli_full_connection failed"); @@ -1792,15 +1792,15 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture) return false; } - lp_smbcli_options(torture->lp_ctx, &options); - lp_smbcli_session_options(torture->lp_ctx, &session_options); + lpcfg_smbcli_options(torture->lp_ctx, &options); + lpcfg_smbcli_session_options(torture->lp_ctx, &session_options); status = smbcli_full_connection( mem_ctx, &cli, torture_setting_string(torture, "host", NULL), - lp_smb_ports(torture->lp_ctx), - "IPC$", NULL, lp_socket_options(torture->lp_ctx), cmdline_credentials, - lp_resolve_context(torture->lp_ctx), torture->ev, &options, - &session_options, lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_smb_ports(torture->lp_ctx), + "IPC$", NULL, lpcfg_socket_options(torture->lp_ctx), cmdline_credentials, + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, + &session_options, lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { torture_warning(torture, "smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1823,11 +1823,11 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture) status = smbcli_full_connection( mem_ctx, &cli, torture_setting_string(torture, "host", NULL), - lp_smb_ports(torture->lp_ctx), "IPC$", NULL, - lp_socket_options(torture->lp_ctx), anon_creds, - lp_resolve_context(torture->lp_ctx), + lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL, + lpcfg_socket_options(torture->lp_ctx), anon_creds, + lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options, &session_options, - lp_gensec_settings(torture, torture->lp_ctx)); + lpcfg_gensec_settings(torture, torture->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { torture_warning(torture, "anon smbcli_full_connection failed: %s\n", nt_errstr(status)); @@ -1889,7 +1889,7 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture) setup.in.capabilities = cli->transport->negotiate.capabilities; setup.in.workgroup = ""; setup.in.credentials = user_creds; - setup.in.gensec_settings = lp_gensec_settings(torture, torture->lp_ctx); + setup.in.gensec_settings = lpcfg_gensec_settings(torture, torture->lp_ctx); status = smb_composite_sesssetup(session2, &setup); if (!NT_STATUS_IS_OK(status)) { @@ -2756,7 +2756,7 @@ static bool torture_samba3_rpc_spoolss(struct torture_context *torture) ZERO_STRUCT(userlevel1); userlevel1.client = talloc_asprintf( - torture, "\\\\%s", lp_netbios_name(torture->lp_ctx)); + torture, "\\\\%s", lpcfg_netbios_name(torture->lp_ctx)); userlevel1.user = cli_credentials_get_username(cmdline_credentials); userlevel1.build = 2600; userlevel1.major = 3; diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index cbe1f44f37..0ba0d2633f 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -1362,8 +1362,8 @@ static bool test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, samlogon_state.account_name = account_name; samlogon_state.account_domain = account_domain; samlogon_state.password = plain_pass; - samlogon_state.workgroup = lp_workgroup(tctx->lp_ctx); - samlogon_state.netbios_name = lp_netbios_name(tctx->lp_ctx); + samlogon_state.workgroup = lpcfg_workgroup(tctx->lp_ctx); + samlogon_state.netbios_name = lpcfg_netbios_name(tctx->lp_ctx); samlogon_state.p = p; samlogon_state.creds = creds; samlogon_state.expected_error = expected_error; @@ -1568,7 +1568,7 @@ static bool handle_minPwdAge(struct torture_context *torture, ld_r.in.connect_handle = &connect_handle; ld_r.in.domain_name = &domName; - ld_r.in.domain_name->string = lp_workgroup(torture->lp_ctx); + ld_r.in.domain_name->string = lpcfg_workgroup(torture->lp_ctx); ld_r.out.sid = &domSid; torture_assert_ntstatus_ok(torture, @@ -1670,7 +1670,7 @@ bool torture_rpc_samlogon(struct torture_context *torture) return false; } - userdomain = torture_setting_string(torture, "userdomain", lp_workgroup(torture->lp_ctx)); + userdomain = torture_setting_string(torture, "userdomain", lpcfg_workgroup(torture->lp_ctx)); user_ctx = torture_create_testuser(torture, TEST_USER_NAME, @@ -1906,7 +1906,7 @@ bool torture_rpc_samlogon(struct torture_context *torture) .username = talloc_asprintf(mem_ctx, "%s@%s", TEST_USER_NAME, - lp_realm(torture->lp_ctx)), + lpcfg_realm(torture->lp_ctx)), .password = user_password, .network_login = true, .expected_interactive_error = NT_STATUS_OK, diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 59f020d164..a34ef4092c 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -2859,11 +2859,11 @@ static bool test_SamLogon(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, dcerpc_schannel_creds(p->conn->security_state.generic_state, tctx, &creds), ""); - if (lp_client_lanman_auth(tctx->lp_ctx)) { + if (lpcfg_client_lanman_auth(tctx->lp_ctx)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth(tctx->lp_ctx)) { + if (lpcfg_client_ntlmv2_auth(tctx->lp_ctx)) { flags |= CLI_CRED_NTLMv2_AUTH; } diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c index 1bdfe22783..63f99f9005 100644 --- a/source4/torture/rpc/samr_accessmask.c +++ b/source4/torture/rpc/samr_accessmask.c @@ -446,7 +446,7 @@ static bool test_samr_accessmask_LookupDomain(struct torture_context *tctx, ld.in.connect_handle = &ch; ld.in.domain_name = &dn; ld.out.sid = &sid; - dn.string = lp_workgroup(tctx->lp_ctx); + dn.string = lpcfg_workgroup(tctx->lp_ctx); torture_assert_ntstatus_ok(tctx, dcerpc_samr_LookupDomain_r(b, tctx, &ld), "LookupDomain failed"); @@ -472,7 +472,7 @@ static bool test_samr_accessmask_LookupDomain(struct torture_context *tctx, ld.in.connect_handle = &ch; ld.in.domain_name = &dn; ld.out.sid = &sid; - dn.string = lp_workgroup(tctx->lp_ctx); + dn.string = lpcfg_workgroup(tctx->lp_ctx); torture_assert_ntstatus_ok(tctx, dcerpc_samr_LookupDomain_r(b, tctx, &ld), "LookupDomain failed"); @@ -528,7 +528,7 @@ static bool test_samr_accessmask_OpenDomain(struct torture_context *tctx, ld.in.connect_handle = &ch; ld.in.domain_name = &dn; ld.out.sid = &sid; - dn.string = lp_workgroup(tctx->lp_ctx); + dn.string = lpcfg_workgroup(tctx->lp_ctx); torture_assert_ntstatus_ok(tctx, dcerpc_samr_LookupDomain_r(b, tctx, &ld), "LookupDomain failed"); if (!NT_STATUS_IS_OK(ld.out.result)) { @@ -616,7 +616,7 @@ static bool test_samr_connect(struct torture_context *tctx, } /* create a test user */ - testuser = torture_create_testuser(tctx, TEST_USER_NAME, lp_workgroup(tctx->lp_ctx), + testuser = torture_create_testuser(tctx, TEST_USER_NAME, lpcfg_workgroup(tctx->lp_ctx), ACB_NORMAL, &testuser_passwd); if (!testuser) { printf("Failed to create test user\n"); @@ -624,7 +624,7 @@ static bool test_samr_connect(struct torture_context *tctx, } test_credentials = cli_credentials_init(tctx); cli_credentials_set_workstation(test_credentials, "localhost", CRED_SPECIFIED); - cli_credentials_set_domain(test_credentials, lp_workgroup(tctx->lp_ctx), + cli_credentials_set_domain(test_credentials, lpcfg_workgroup(tctx->lp_ctx), CRED_SPECIFIED); cli_credentials_set_username(test_credentials, TEST_USER_NAME, CRED_SPECIFIED); cli_credentials_set_password(test_credentials, testuser_passwd, CRED_SPECIFIED); @@ -1145,7 +1145,7 @@ static bool torture_rpc_samr_workstation_query(struct torture_context *tctx, torture_assert(tctx, test_samr_domain(tctx, b, SEC_FLAG_MAXIMUM_ALLOWED, - lp_workgroup(tctx->lp_ctx), + lpcfg_workgroup(tctx->lp_ctx), &connect_handle, &domain_handle), "failed to test domain"); diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 6e0d9471d1..90c451429a 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -1548,7 +1548,7 @@ bool torture_rpc_samsync(struct torture_context *torture) test_machine_account = talloc_asprintf(mem_ctx, "%s$", TEST_MACHINE_NAME); join_ctx = torture_create_testuser(torture, test_machine_account, - lp_workgroup(torture->lp_ctx), ACB_SVRTRUST, + lpcfg_workgroup(torture->lp_ctx), ACB_SVRTRUST, &machine_password); if (!join_ctx) { talloc_free(mem_ctx); @@ -1557,7 +1557,7 @@ bool torture_rpc_samsync(struct torture_context *torture) } test_wksta_machine_account = talloc_asprintf(mem_ctx, "%s$", TEST_WKSTA_MACHINE_NAME); - join_ctx2 = torture_create_testuser(torture, test_wksta_machine_account, lp_workgroup(torture->lp_ctx), ACB_WSTRUST, &wksta_machine_password); + join_ctx2 = torture_create_testuser(torture, test_wksta_machine_account, lpcfg_workgroup(torture->lp_ctx), ACB_WSTRUST, &wksta_machine_password); if (!join_ctx2) { talloc_free(mem_ctx); torture_comment(torture, "Failed to join as member\n"); @@ -1565,7 +1565,7 @@ bool torture_rpc_samsync(struct torture_context *torture) } user_ctx = torture_create_testuser(torture, TEST_USER_NAME, - lp_workgroup(torture->lp_ctx), + lpcfg_workgroup(torture->lp_ctx), ACB_NORMAL, NULL); if (!user_ctx) { talloc_free(mem_ctx); @@ -1591,7 +1591,7 @@ bool torture_rpc_samsync(struct torture_context *torture) ret, failed, "samr_Connect failed"); - domain_policy = samsync_open_domain(torture, mem_ctx, samsync_state, lp_workgroup(torture->lp_ctx), NULL); + domain_policy = samsync_open_domain(torture, mem_ctx, samsync_state, lpcfg_workgroup(torture->lp_ctx), NULL); if (!domain_policy) { torture_comment(torture, "samrsync_open_domain failed\n"); ret = false; @@ -1667,7 +1667,7 @@ bool torture_rpc_samsync(struct torture_context *torture) credentials = cli_credentials_init(mem_ctx); cli_credentials_set_workstation(credentials, TEST_MACHINE_NAME, CRED_SPECIFIED); - cli_credentials_set_domain(credentials, lp_workgroup(torture->lp_ctx), CRED_SPECIFIED); + cli_credentials_set_domain(credentials, lpcfg_workgroup(torture->lp_ctx), CRED_SPECIFIED); cli_credentials_set_username(credentials, test_machine_account, CRED_SPECIFIED); cli_credentials_set_password(credentials, machine_password, CRED_SPECIFIED); cli_credentials_set_secure_channel_type(credentials, @@ -1705,7 +1705,7 @@ bool torture_rpc_samsync(struct torture_context *torture) credentials_wksta = cli_credentials_init(mem_ctx); cli_credentials_set_workstation(credentials_wksta, TEST_WKSTA_MACHINE_NAME, CRED_SPECIFIED); - cli_credentials_set_domain(credentials_wksta, lp_workgroup(torture->lp_ctx), CRED_SPECIFIED); + cli_credentials_set_domain(credentials_wksta, lpcfg_workgroup(torture->lp_ctx), CRED_SPECIFIED); cli_credentials_set_username(credentials_wksta, test_wksta_machine_account, CRED_SPECIFIED); cli_credentials_set_password(credentials_wksta, wksta_machine_password, CRED_SPECIFIED); cli_credentials_set_secure_channel_type(credentials_wksta, diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c index c07846cc27..e434da2615 100644 --- a/source4/torture/rpc/scanner.c +++ b/source4/torture/rpc/scanner.c @@ -128,7 +128,7 @@ bool torture_rpc_scanner(struct torture_context *torture) b->endpoint = talloc_strdup(b, l->table->name); } - lp_set_cmdline(torture->lp_ctx, "torture:binding", dcerpc_binding_string(torture, b)); + lpcfg_set_cmdline(torture->lp_ctx, "torture:binding", dcerpc_binding_string(torture, b)); status = torture_rpc_connection(torture, &p, &ndr_table_mgmt); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index ce903bd7b3..c76231c991 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -57,11 +57,11 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx, int flags = CLI_CRED_NTLM_AUTH; struct dcerpc_binding_handle *b = p->binding_handle; - if (lp_client_lanman_auth(tctx->lp_ctx)) { + if (lpcfg_client_lanman_auth(tctx->lp_ctx)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth(tctx->lp_ctx)) { + if (lpcfg_client_ntlmv2_auth(tctx->lp_ctx)) { flags |= CLI_CRED_NTLMv2_AUTH; } @@ -138,7 +138,7 @@ static bool test_samr_ops(struct torture_context *tctx, struct policy_handle handle; struct policy_handle domain_handle; - name.string = lp_workgroup(tctx->lp_ctx); + name.string = lpcfg_workgroup(tctx->lp_ctx); r.in.domain_name = &name; r.out.info = &info; @@ -304,7 +304,7 @@ static bool test_schannel(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "seconday connection"); status = dcerpc_bind_auth(p_netlogon, &ndr_table_netlogon, - credentials, lp_gensec_settings(tctx, tctx->lp_ctx), + credentials, lpcfg_gensec_settings(tctx, tctx->lp_ctx), DCERPC_AUTH_TYPE_SCHANNEL, dcerpc_auth_level(p->conn), NULL); @@ -331,7 +331,7 @@ static bool test_schannel(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "seconday connection"); status = dcerpc_bind_auth(p_lsa, &ndr_table_lsarpc, - credentials, lp_gensec_settings(tctx, tctx->lp_ctx), + credentials, lpcfg_gensec_settings(tctx, tctx->lp_ctx), DCERPC_AUTH_TYPE_SCHANNEL, dcerpc_auth_level(p->conn), NULL); @@ -372,7 +372,7 @@ static bool test_schannel(struct torture_context *tctx, /* and now setup an SCHANNEL bind on netlogon */ status = dcerpc_bind_auth(p_netlogon2, &ndr_table_netlogon, - credentials, lp_gensec_settings(tctx, tctx->lp_ctx), + credentials, lpcfg_gensec_settings(tctx, tctx->lp_ctx), DCERPC_AUTH_TYPE_SCHANNEL, dcerpc_auth_level(p_samr2->conn), NULL); @@ -575,11 +575,11 @@ static bool torture_schannel_bench_start(struct torture_schannel_bench_conn *con user_creds = s->user2_creds; } - if (lp_client_lanman_auth(s->tctx->lp_ctx)) { + if (lpcfg_client_lanman_auth(s->tctx->lp_ctx)) { flags |= CLI_CRED_LANMAN_AUTH; } - if (lp_client_ntlmv2_auth(s->tctx->lp_ctx)) { + if (lpcfg_client_ntlmv2_auth(s->tctx->lp_ctx)) { flags |= CLI_CRED_NTLMv2_AUTH; } diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c index 7335c40df3..b7c90e4b4e 100644 --- a/source4/torture/rpc/session_key.c +++ b/source4/torture/rpc/session_key.c @@ -156,9 +156,9 @@ static bool test_secrets(struct torture_context *torture, const void *_data) NTSTATUS status; struct dcerpc_binding_handle *b; - lp_set_cmdline(torture->lp_ctx, "ntlmssp client:keyexchange", settings->keyexchange?"True":"False"); - lp_set_cmdline(torture->lp_ctx, "ntlmssp_client:ntlm2", settings->ntlm2?"True":"False"); - lp_set_cmdline(torture->lp_ctx, "ntlmssp_client:lm_key", settings->lm_key?"True":"False"); + lpcfg_set_cmdline(torture->lp_ctx, "ntlmssp client:keyexchange", settings->keyexchange?"True":"False"); + lpcfg_set_cmdline(torture->lp_ctx, "ntlmssp_client:ntlm2", settings->ntlm2?"True":"False"); + lpcfg_set_cmdline(torture->lp_ctx, "ntlmssp_client:lm_key", settings->lm_key?"True":"False"); torture_assert_ntstatus_ok(torture, torture_rpc_binding(torture, &binding), "Getting bindoptions"); diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 7e1572861d..12dc8240cf 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -8242,20 +8242,20 @@ static bool connect_printer_driver_share(struct torture_context *tctx, torture_comment(tctx, "Connecting printer driver share '%s' on '%s'\n", share_name, server_name); - lp_smbcli_options(tctx->lp_ctx, &smb_options); - lp_smbcli_session_options(tctx->lp_ctx, &smb_session_options); + lpcfg_smbcli_options(tctx->lp_ctx, &smb_options); + lpcfg_smbcli_session_options(tctx->lp_ctx, &smb_session_options); torture_assert_ntstatus_ok(tctx, smbcli_full_connection(tctx, cli, server_name, - lp_smb_ports(tctx->lp_ctx), + lpcfg_smb_ports(tctx->lp_ctx), share_name, NULL, - lp_socket_options(tctx->lp_ctx), + lpcfg_socket_options(tctx->lp_ctx), cmdline_credentials, - lp_resolve_context(tctx->lp_ctx), + lpcfg_resolve_context(tctx->lp_ctx), tctx->ev, &smb_options, &smb_session_options, - lp_gensec_settings(tctx, tctx->lp_ctx)), + lpcfg_gensec_settings(tctx, tctx->lp_ctx)), "failed to open driver share"); return true; diff --git a/source4/torture/rpc/spoolss_access.c b/source4/torture/rpc/spoolss_access.c index f38082c120..08d1375f63 100644 --- a/source4/torture/rpc/spoolss_access.c +++ b/source4/torture/rpc/spoolss_access.c @@ -449,7 +449,7 @@ static bool torture_rpc_spoolss_access_setup_common(struct torture_context *tctx test_credentials = cli_credentials_init(tctx); cli_credentials_set_workstation(test_credentials, "localhost", CRED_SPECIFIED); - cli_credentials_set_domain(test_credentials, lp_workgroup(tctx->lp_ctx), + cli_credentials_set_domain(test_credentials, lpcfg_workgroup(tctx->lp_ctx), CRED_SPECIFIED); cli_credentials_set_username(test_credentials, t->user.username, CRED_SPECIFIED); cli_credentials_set_password(test_credentials, testuser_passwd, CRED_SPECIFIED); diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c index 26faf0abc8..8e23637442 100644 --- a/source4/torture/rpc/spoolss_notify.c +++ b/source4/torture/rpc/spoolss_notify.c @@ -453,9 +453,9 @@ static bool test_start_dcerpc_server(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, dcerpc_register_ep_server(&ep_server), "unable to register spoolss server"); - lp_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss"); + lpcfg_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss"); - load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces); + load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces); address = iface_n_ip(ifaces, 0); torture_comment(tctx, "Listening for callbacks on %s\n", address); diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 0e61960fec..c4ab0e43ad 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -368,7 +368,7 @@ again: u.info21.description.string = talloc_asprintf(join, "Samba4 torture account created by host %s: %s", - lp_netbios_name(torture->lp_ctx), + lpcfg_netbios_name(torture->lp_ctx), timestring(join, time(NULL))); printf("Resetting ACB flags, force pw change time\n"); @@ -425,7 +425,7 @@ _PUBLIC_ struct test_join *torture_join_domain(struct torture_context *tctx, return NULL; } - libnet_ctx = libnet_context_init(tctx->ev, tctx->lp_ctx); + libnet_ctx = libnet_context_init(tctx->ev, tctx->lp_ctx); if (!libnet_ctx) { talloc_free(tj); return NULL; @@ -489,7 +489,7 @@ _PUBLIC_ struct test_join *torture_join_domain(struct torture_context *tctx, u.info21.description.string = talloc_asprintf(tj, "Samba4 torture account created by host %s: %s", - lp_netbios_name(tctx->lp_ctx), timestring(tj, time(NULL))); + lpcfg_netbios_name(tctx->lp_ctx), timestring(tj, time(NULL))); status = dcerpc_samr_SetUserInfo_r(tj->p->binding_handle, tj, &s); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index a8556c58cf..3121213fca 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -217,7 +217,7 @@ static bool test_NetrWkstaUserGetInfo(struct torture_context *tctx, NTSTATUS status; struct wkssvc_NetrWkstaUserGetInfo r; union wkssvc_NetrWkstaUserInfo info; - const char *dom = lp_workgroup(tctx->lp_ctx); + const char *dom = lpcfg_workgroup(tctx->lp_ctx); struct cli_credentials *creds = cmdline_credentials; const char *user = cli_credentials_get_username(creds); int i; @@ -495,7 +495,7 @@ static bool test_NetrLogonDomainNameAdd(struct torture_context *tctx, struct wkssvc_NetrLogonDomainNameAdd r; struct dcerpc_binding_handle *b = p->binding_handle; - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); torture_comment(tctx, "Testing NetrLogonDomainNameAdd\n"); @@ -514,7 +514,7 @@ static bool test_NetrLogonDomainNameDel(struct torture_context *tctx, struct wkssvc_NetrLogonDomainNameDel r; struct dcerpc_binding_handle *b = p->binding_handle; - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); torture_comment(tctx, "Testing NetrLogonDomainNameDel\n"); @@ -610,7 +610,7 @@ static bool test_NetrValidateName(struct torture_context *tctx, for (i=0; i<ARRAY_SIZE(levels); i++) { r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); - r.in.name = lp_workgroup(tctx->lp_ctx); + r.in.name = lpcfg_workgroup(tctx->lp_ctx); r.in.Account = NULL; r.in.Password = NULL; r.in.name_type = levels[i]; @@ -641,7 +641,7 @@ static bool test_NetrValidateName2(struct torture_context *tctx, for (i=0; i<ARRAY_SIZE(levels); i++) { r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); - r.in.name = lp_workgroup(tctx->lp_ctx); + r.in.name = lpcfg_workgroup(tctx->lp_ctx); r.in.Account = NULL; r.in.EncryptedPassword = NULL; r.in.name_type = levels[i]; @@ -1075,7 +1075,7 @@ static bool test_NetrGetJoinableOus(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; r.in.server_name = dcerpc_server_name(p); - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); r.in.Account = NULL; r.in.unknown = NULL; r.in.num_ous = r.out.num_ous = &num_ous; @@ -1102,7 +1102,7 @@ static bool test_NetrGetJoinableOus2(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; r.in.server_name = dcerpc_server_name(p); - r.in.domain_name = lp_workgroup(tctx->lp_ctx); + r.in.domain_name = lpcfg_workgroup(tctx->lp_ctx); r.in.Account = NULL; r.in.EncryptedPassword = NULL; r.in.num_ous = r.out.num_ous = &num_ous; @@ -1130,7 +1130,7 @@ static bool test_NetrUnjoinDomain(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; admin_account = talloc_asprintf(tctx, "%s\\%s", - lp_workgroup(tctx->lp_ctx), + lpcfg_workgroup(tctx->lp_ctx), user); r.in.server_name = dcerpc_server_name(p); @@ -1159,11 +1159,11 @@ static bool test_NetrJoinDomain(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; admin_account = talloc_asprintf(tctx, "%s\\%s", - lp_workgroup(tctx->lp_ctx), + lpcfg_workgroup(tctx->lp_ctx), user); r.in.server_name = dcerpc_server_name(p); - r.in.domain_name = lp_dnsdomain(tctx->lp_ctx); + r.in.domain_name = lpcfg_dnsdomain(tctx->lp_ctx); r.in.account_ou = NULL; r.in.Account = admin_account; r.in.password = NULL; |