summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/auth/ntlmssp.c4
-rw-r--r--source4/torture/auth/pac.c2
-rw-r--r--source4/torture/basic/base.c20
-rw-r--r--source4/torture/basic/charset.c2
-rw-r--r--source4/torture/basic/misc.c58
-rw-r--r--source4/torture/basic/secleak.c6
-rw-r--r--source4/torture/gentest.c22
-rw-r--r--source4/torture/ldap/cldap.c10
-rw-r--r--source4/torture/ldap/cldapbench.c6
-rw-r--r--source4/torture/libnet/domain.c2
-rw-r--r--source4/torture/libnet/groupinfo.c2
-rw-r--r--source4/torture/libnet/groupman.c2
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c6
-rw-r--r--source4/torture/libnet/libnet_domain.c8
-rw-r--r--source4/torture/libnet/libnet_group.c6
-rw-r--r--source4/torture/libnet/libnet_lookup.c4
-rw-r--r--source4/torture/libnet/libnet_rpc.c6
-rw-r--r--source4/torture/libnet/libnet_user.c16
-rw-r--r--source4/torture/libnet/userinfo.c2
-rw-r--r--source4/torture/libnet/userman.c6
-rw-r--r--source4/torture/local/dbspeed.c2
-rw-r--r--source4/torture/locktest.c18
-rw-r--r--source4/torture/locktest2.c12
-rw-r--r--source4/torture/masktest.c12
-rw-r--r--source4/torture/nbt/browse.c2
-rw-r--r--source4/torture/nbt/dgram.c48
-rw-r--r--source4/torture/nbt/nbt.c2
-rw-r--r--source4/torture/nbt/query.c2
-rw-r--r--source4/torture/nbt/register.c8
-rw-r--r--source4/torture/nbt/wins.c24
-rw-r--r--source4/torture/nbt/winsbench.c4
-rw-r--r--source4/torture/nbt/winsreplication.c18
-rw-r--r--source4/torture/ntp/ntp_signd.c2
-rw-r--r--source4/torture/rap/sam.c6
-rw-r--r--source4/torture/raw/composite.c22
-rw-r--r--source4/torture/raw/context.c34
-rw-r--r--source4/torture/raw/lock.c6
-rw-r--r--source4/torture/raw/lockbench.c12
-rw-r--r--source4/torture/raw/openbench.c12
-rw-r--r--source4/torture/raw/oplock.c12
-rw-r--r--source4/torture/raw/samba3misc.c8
-rw-r--r--source4/torture/raw/tconrate.c12
-rw-r--r--source4/torture/rpc/countcalls.c2
-rw-r--r--source4/torture/rpc/drsuapi.c6
-rw-r--r--source4/torture/rpc/dssync.c36
-rw-r--r--source4/torture/rpc/frsapi.c2
-rw-r--r--source4/torture/rpc/join.c20
-rw-r--r--source4/torture/rpc/mgmt.c2
-rw-r--r--source4/torture/rpc/netlogon.c42
-rw-r--r--source4/torture/rpc/remote_pac.c12
-rw-r--r--source4/torture/rpc/samba3rpc.c80
-rw-r--r--source4/torture/rpc/samlogon.c10
-rw-r--r--source4/torture/rpc/samr.c4
-rw-r--r--source4/torture/rpc/samr_accessmask.c12
-rw-r--r--source4/torture/rpc/samsync.c12
-rw-r--r--source4/torture/rpc/scanner.c2
-rw-r--r--source4/torture/rpc/schannel.c16
-rw-r--r--source4/torture/rpc/session_key.c6
-rw-r--r--source4/torture/rpc/spoolss.c12
-rw-r--r--source4/torture/rpc/spoolss_access.c2
-rw-r--r--source4/torture/rpc/spoolss_notify.c4
-rw-r--r--source4/torture/rpc/testjoin.c6
-rw-r--r--source4/torture/rpc/wkssvc.c20
-rw-r--r--source4/torture/shell.c4
-rw-r--r--source4/torture/smb2/oplock.c10
-rw-r--r--source4/torture/smb2/scan.c18
-rw-r--r--source4/torture/smb2/util.c10
-rw-r--r--source4/torture/smbiconv.c2
-rw-r--r--source4/torture/smbtorture.c106
-rw-r--r--source4/torture/unix/unix_info2.c12
-rw-r--r--source4/torture/unix/whoami.c12
-rw-r--r--source4/torture/util_smb.c14
-rw-r--r--source4/torture/winbind/struct_based.c10
73 files changed, 487 insertions, 487 deletions
diff --git a/source4/torture/auth/ntlmssp.c b/source4/torture/auth/ntlmssp.c
index 6c5bb1d43b..d7639ac9cf 100644
--- a/source4/torture/auth/ntlmssp.c
+++ b/source4/torture/auth/ntlmssp.c
@@ -35,7 +35,7 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx,
gensec_client_start(mem_ctx, &gensec_security,
- tctx->ev, lp_gensec_settings(tctx, tctx->lp_ctx)),
+ tctx->ev, lpcfg_gensec_settings(tctx, tctx->lp_ctx)),
"gensec client start");
gensec_set_credentials(gensec_security, cmdline_credentials);
@@ -92,7 +92,7 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx,
gensec_client_start(mem_ctx, &gensec_security,
- tctx->ev, lp_gensec_settings(tctx, tctx->lp_ctx)),
+ tctx->ev, lpcfg_gensec_settings(tctx, tctx->lp_ctx)),
"Failed to start GENSEC for NTLMSSP");
gensec_set_credentials(gensec_security, cmdline_credentials);
diff --git a/source4/torture/auth/pac.c b/source4/torture/auth/pac.c
index 2223f39161..4133e75ffa 100644
--- a/source4/torture/auth/pac.c
+++ b/source4/torture/auth/pac.c
@@ -90,7 +90,7 @@ static bool torture_pac_self_check(struct torture_context *tctx)
}
/* We need an input, and this one requires no underlying database */
- nt_status = auth_anonymous_server_info(mem_ctx, lp_netbios_name(tctx->lp_ctx), &server_info);
+ nt_status = auth_anonymous_server_info(mem_ctx, lpcfg_netbios_name(tctx->lp_ctx), &server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
krb5_free_keyblock_contents(smb_krb5_context->krb5_context,
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index b2d523283a..c9148d1915 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -41,7 +41,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
const char *host = torture_setting_string(tctx, "host", NULL);
struct smbcli_options options;
- make_nbt_name_client(&calling, lp_netbios_name(tctx->lp_ctx));
+ make_nbt_name_client(&calling, lpcfg_netbios_name(tctx->lp_ctx));
nbt_choose_called_name(NULL, &called, host, NBT_NAME_SERVER);
@@ -51,11 +51,11 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
goto failed;
}
- lp_smbcli_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_options(tctx->lp_ctx, &options);
- if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), tctx->ev,
- lp_resolve_context(tctx->lp_ctx), &options,
- lp_socket_options(tctx->lp_ctx))) {
+ if (!smbcli_socket_connect(cli, host, lpcfg_smb_ports(tctx->lp_ctx), tctx->ev,
+ lpcfg_resolve_context(tctx->lp_ctx), &options,
+ lpcfg_socket_options(tctx->lp_ctx))) {
torture_comment(tctx, "Failed to connect with %s\n", host);
goto failed;
}
@@ -359,7 +359,7 @@ static bool run_negprot_nowait(struct torture_context *tctx)
for (i=0;i<100;i++) {
struct smbcli_request *req;
- req = smb_raw_negotiate_send(cli->transport, lp_unicode(tctx->lp_ctx), PROTOCOL_NT1);
+ req = smb_raw_negotiate_send(cli->transport, lpcfg_unicode(tctx->lp_ctx), PROTOCOL_NT1);
event_loop_once(cli->transport->socket->event.ctx);
if (req->state == SMBCLI_REQUEST_ERROR) {
if (i > 0) {
@@ -1453,9 +1453,9 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
union smb_open io;
NTSTATUS status;
- nt_status_support = lp_nt_status_support(tctx->lp_ctx);
+ nt_status_support = lpcfg_nt_status_support(tctx->lp_ctx);
- if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
torture_comment(tctx, "Could not set 'nt status support = yes'\n");
goto fail;
}
@@ -1464,7 +1464,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
goto fail;
}
- if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "no")) {
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "no")) {
torture_comment(tctx, "Could not set 'nt status support = yes'\n");
goto fail;
}
@@ -1473,7 +1473,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
goto fail;
}
- if (!lp_set_cmdline(tctx->lp_ctx, "nt status support",
+ if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support",
nt_status_support ? "yes":"no")) {
torture_comment(tctx, "Could not reset 'nt status support = yes'");
goto fail;
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index 3cfcadcb7a..b4221a75b6 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -54,7 +54,7 @@ static NTSTATUS unicode_open(struct torture_context *tctx,
}
SSVAL(ucs_name, i*2, 0);
- if (!convert_string_talloc_convenience(ucs_name, lp_iconv_convenience(tctx->lp_ctx), CH_UTF16, CH_UNIX, ucs_name, (1+u_name_len)*2, (void **)&fname, &i, false)) {
+ if (!convert_string_talloc_convenience(ucs_name, lpcfg_iconv_convenience(tctx->lp_ctx), CH_UTF16, CH_UNIX, ucs_name, (1+u_name_len)*2, (void **)&fname, &i, false)) {
torture_comment(tctx, "Failed to convert UCS2 Name into unix - convert_string_talloc() failure\n");
talloc_free(ucs_name);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index 24e8e37331..7223272984 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -485,11 +485,11 @@ struct benchrw_state {
unsigned int blocksize;
unsigned int writeratio;
int num_parallel_requests;
- } *lp_params;
+ } *lpcfg_params;
};
/*
- init params using lp_parm_xxx
+ init params using lpcfg_parm_xxx
return number of unclist entries
*/
static int init_benchrw_params(struct torture_context *tctx,
@@ -504,7 +504,7 @@ static int init_benchrw_params(struct torture_context *tctx,
lpar->writeratio = torture_setting_int(tctx, "writeratio",5);
lpar->num_parallel_requests = torture_setting_int(
tctx, "parallel_requests", 5);
- lpar->workgroup = lp_workgroup(tctx->lp_ctx);
+ lpar->workgroup = lpcfg_workgroup(tctx->lp_ctx);
p = torture_setting_string(tctx, "unclist", NULL);
if (p) {
@@ -619,7 +619,7 @@ static NTSTATUS benchrw_readwrite(struct torture_context *tctx,
union smb_write wr;
/* randomize between writes and reads*/
- if (random() % state->lp_params->writeratio == 0) {
+ if (random() % state->lpcfg_params->writeratio == 0) {
torture_comment(tctx, "Callback WRITE file:%d (%d/%d)\n",
state->nr,state->completed,torture_numops);
wr.generic.level = RAW_WRITE_WRITEX ;
@@ -627,7 +627,7 @@ static NTSTATUS benchrw_readwrite(struct torture_context *tctx,
wr.writex.in.offset = 0;
wr.writex.in.wmode = 0 ;
wr.writex.in.remaining = 0;
- wr.writex.in.count = state->lp_params->blocksize;
+ wr.writex.in.count = state->lpcfg_params->blocksize;
wr.writex.in.data = state->buffer;
state->readcnt=0;
req = smb_raw_write_send(state->cli,&wr);
@@ -636,16 +636,16 @@ static NTSTATUS benchrw_readwrite(struct torture_context *tctx,
torture_comment(tctx,
"Callback READ file:%d (%d/%d) Offset:%d\n",
state->nr,state->completed,torture_numops,
- (state->readcnt*state->lp_params->blocksize));
+ (state->readcnt*state->lpcfg_params->blocksize));
rd.generic.level = RAW_READ_READX;
rd.readx.in.file.fnum = state->fnum ;
- rd.readx.in.offset = state->readcnt*state->lp_params->blocksize;
- rd.readx.in.mincnt = state->lp_params->blocksize;
+ rd.readx.in.offset = state->readcnt*state->lpcfg_params->blocksize;
+ rd.readx.in.mincnt = state->lpcfg_params->blocksize;
rd.readx.in.maxcnt = rd.readx.in.mincnt;
rd.readx.in.remaining = 0 ;
rd.readx.out.data = state->buffer;
rd.readx.in.read_for_execute = false;
- if(state->readcnt < state->lp_params->writeblocks){
+ if(state->readcnt < state->lpcfg_params->writeblocks){
state->readcnt++;
}else{
/*start reading from beginn of file*/
@@ -683,21 +683,21 @@ static NTSTATUS benchrw_open(struct torture_context *tctx,
}
torture_comment(tctx, "Write initial test file:%d (%d/%d)\n",state->nr,
- (state->writecnt+1)*state->lp_params->blocksize,
- (state->lp_params->writeblocks*state->lp_params->blocksize));
+ (state->writecnt+1)*state->lpcfg_params->blocksize,
+ (state->lpcfg_params->writeblocks*state->lpcfg_params->blocksize));
wr.generic.level = RAW_WRITE_WRITEX ;
wr.writex.in.file.fnum = state->fnum ;
wr.writex.in.offset = state->writecnt *
- state->lp_params->blocksize;
+ state->lpcfg_params->blocksize;
wr.writex.in.wmode = 0 ;
- wr.writex.in.remaining = (state->lp_params->writeblocks *
- state->lp_params->blocksize)-
+ wr.writex.in.remaining = (state->lpcfg_params->writeblocks *
+ state->lpcfg_params->blocksize)-
((state->writecnt+1)*state->
- lp_params->blocksize);
- wr.writex.in.count = state->lp_params->blocksize;
+ lpcfg_params->blocksize);
+ wr.writex.in.count = state->lpcfg_params->blocksize;
wr.writex.in.data = state->buffer;
state->writecnt++;
- if(state->writecnt == state->lp_params->writeblocks){
+ if(state->writecnt == state->lpcfg_params->writeblocks){
state->mode=READ_WRITE_DATA;
}
req = smb_raw_write_send(state->cli,&wr);
@@ -738,9 +738,9 @@ static NTSTATUS benchrw_mkdir(struct torture_context *tctx,
open_parms->openx.in.timeout = 0;
open_parms->openx.in.fname = state->fname;
- writedata = talloc_size(tctx,state->lp_params->blocksize);
+ writedata = talloc_size(tctx,state->lpcfg_params->blocksize);
NT_STATUS_HAVE_NO_MEMORY(writedata);
- generate_random_buffer(writedata,state->lp_params->blocksize);
+ generate_random_buffer(writedata,state->lpcfg_params->blocksize);
state->buffer=writedata;
state->writecnt=1;
state->readcnt=0;
@@ -795,7 +795,7 @@ static void benchrw_callback(struct smbcli_request *req)
break;
case READ_WRITE_DATA:
while (state->num_parallel_requests
- < state->lp_params->num_parallel_requests) {
+ < state->lpcfg_params->num_parallel_requests) {
NTSTATUS status;
status = benchrw_readwrite(tctx,state);
if (!NT_STATUS_IS_OK(status)){
@@ -838,7 +838,7 @@ static void async_open_callback(struct composite_context *con)
{
struct benchrw_state *state = con->async.private_data;
struct torture_context *tctx = state->tctx;
- int retry = state->lp_params->retry;
+ int retry = state->lpcfg_params->retry;
if (NT_STATUS_IS_OK(con->status)) {
state->cli=((struct smb_composite_connect*)
@@ -877,19 +877,19 @@ static struct composite_context *torture_connect_async(
torture_comment(tctx, "Open Connection to %s/%s\n",host,share);
smb->in.dest_host=talloc_strdup(mem_ctx,host);
smb->in.service=talloc_strdup(mem_ctx,share);
- smb->in.dest_ports=lp_smb_ports(tctx->lp_ctx);
- smb->in.socket_options = lp_socket_options(tctx->lp_ctx);
+ smb->in.dest_ports=lpcfg_smb_ports(tctx->lp_ctx);
+ smb->in.socket_options = lpcfg_socket_options(tctx->lp_ctx);
smb->in.called_name = strupper_talloc(mem_ctx, host);
smb->in.service_type=NULL;
smb->in.credentials=cmdline_credentials;
smb->in.fallback_to_anonymous=false;
- smb->in.gensec_settings = lp_gensec_settings(mem_ctx, tctx->lp_ctx);
+ smb->in.gensec_settings = lpcfg_gensec_settings(mem_ctx, tctx->lp_ctx);
smb->in.workgroup=workgroup;
- lp_smbcli_options(tctx->lp_ctx, &smb->in.options);
- lp_smbcli_session_options(tctx->lp_ctx, &smb->in.session_options);
+ lpcfg_smbcli_options(tctx->lp_ctx, &smb->in.options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &smb->in.session_options);
return smb_composite_connect_send(smb,mem_ctx,
- lp_resolve_context(tctx->lp_ctx),ev);
+ lpcfg_resolve_context(tctx->lp_ctx),ev);
}
bool run_benchrw(struct torture_context *tctx)
@@ -915,7 +915,7 @@ bool run_benchrw(struct torture_context *tctx)
ev = tctx->ev;
state = talloc_array(tctx, struct benchrw_state *, torture_nprocs);
- /* init params using lp_parm_xxx */
+ /* init params using lpcfg_parm_xxx */
num_unc_names = init_benchrw_params(tctx,&lpparams);
/* init private data structs*/
@@ -924,7 +924,7 @@ bool run_benchrw(struct torture_context *tctx)
state[i]->tctx = tctx;
state[i]->completed=0;
state[i]->num_parallel_requests=0;
- state[i]->lp_params=&lpparams;
+ state[i]->lpcfg_params=&lpparams;
state[i]->nr=i;
state[i]->dname=talloc_asprintf(tctx,"benchrw%d",i);
state[i]->fname=talloc_asprintf(tctx,"%s%s",
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 363b824b66..92dc3508f3 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -36,14 +36,14 @@ static bool try_failed_login(struct torture_context *tctx, struct smbcli_state *
struct smbcli_session *session;
struct smbcli_session_options options;
- lp_smbcli_session_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &options);
session = smbcli_session_init(cli->transport, cli, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cli_credentials_init(session);
- setup.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ setup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
cli_credentials_set_conf(setup.in.credentials, tctx->lp_ctx);
cli_credentials_set_domain(setup.in.credentials, "INVALID-DOMAIN", CRED_SPECIFIED);
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 10a1370b9d..4fc05df3f4 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -215,8 +215,8 @@ static bool connect_servers(struct tevent_context *ev,
NTSTATUS status;
struct smbcli_options smb_options;
struct smbcli_session_options smb_session_options;
- lp_smbcli_options(lp_ctx, &smb_options);
- lp_smbcli_session_options(lp_ctx, &smb_session_options);
+ lpcfg_smbcli_options(lp_ctx, &smb_options);
+ lpcfg_smbcli_session_options(lp_ctx, &smb_session_options);
printf("Connecting to \\\\%s\\%s as %s - instance %d\n",
servers[i].server_name, servers[i].share_name,
@@ -227,27 +227,27 @@ static bool connect_servers(struct tevent_context *ev,
if (options.smb2) {
status = smb2_connect(NULL, servers[i].server_name,
- lp_smb_ports(lp_ctx),
+ lpcfg_smb_ports(lp_ctx),
servers[i].share_name,
- lp_resolve_context(lp_ctx),
+ lpcfg_resolve_context(lp_ctx),
servers[i].credentials,
&servers[i].smb2_tree[j],
ev, &smb_options,
- lp_socket_options(lp_ctx),
- lp_gensec_settings(lp_ctx, lp_ctx)
+ lpcfg_socket_options(lp_ctx),
+ lpcfg_gensec_settings(lp_ctx, lp_ctx)
);
} else {
status = smbcli_tree_full_connection(NULL,
&servers[i].smb_tree[j],
servers[i].server_name,
- lp_smb_ports(lp_ctx),
+ lpcfg_smb_ports(lp_ctx),
servers[i].share_name, "A:",
- lp_socket_options(lp_ctx),
+ lpcfg_socket_options(lp_ctx),
servers[i].credentials,
- lp_resolve_context(lp_ctx), ev,
+ lpcfg_resolve_context(lp_ctx), ev,
&smb_options,
&smb_session_options,
- lp_gensec_settings(lp_ctx, lp_ctx));
+ lpcfg_gensec_settings(lp_ctx, lp_ctx));
}
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to \\\\%s\\%s - %s\n",
@@ -3185,7 +3185,7 @@ static bool split_unc_name(const char *unc, char **server, char **share)
while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_UNCLIST:
- lp_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
break;
case 'U':
if (username_count == 2) {
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 8b6794374b..689e518e77 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -50,7 +50,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
ret = tsocket_address_inet_from_strings(tctx, "ip",
dest,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
@@ -283,7 +283,7 @@ static bool test_cldap_netlogon_flags(struct torture_context *tctx,
ret = tsocket_address_inet_from_strings(tctx, "ip",
dest,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
@@ -403,7 +403,7 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
ret = tsocket_address_inet_from_strings(tctx, "ip",
dest,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
@@ -440,7 +440,7 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
"rootDomainNamingContext" */
ZERO_STRUCT(search2);
search2.in.dest_address = dest;
- search2.in.dest_port = lp_cldap_port(tctx->lp_ctx);
+ search2.in.dest_port = lpcfg_cldap_port(tctx->lp_ctx);
search2.in.timeout = 10;
search2.in.retries = 3;
search2.in.filter = "(objectclass=*)";
@@ -485,7 +485,7 @@ static bool test_cldap_generic(struct torture_context *tctx, const char *dest)
ret = tsocket_address_inet_from_strings(tctx, "ip",
dest,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c
index 27c0746e9a..5c7e56f40b 100644
--- a/source4/torture/ldap/cldapbench.c
+++ b/source4/torture/ldap/cldapbench.c
@@ -67,7 +67,7 @@ static bool bench_cldap_netlogon(struct torture_context *tctx, const char *addre
ret = tsocket_address_inet_from_strings(tctx, "ip",
address,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
@@ -150,7 +150,7 @@ static bool bench_cldap_rootdse(struct torture_context *tctx, const char *addres
ret = tsocket_address_inet_from_strings(tctx, "ip",
address,
- lp_cldap_port(tctx->lp_ctx),
+ lpcfg_cldap_port(tctx->lp_ctx),
&dest_addr);
CHECK_VAL(ret, 0);
@@ -215,7 +215,7 @@ bool torture_bench_cldap(struct torture_context *torture)
make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
/* do an initial name resolution to find its IP */
- status = resolve_name(lp_resolve_context(torture->lp_ctx), &name, torture, &address, torture->ev);
+ status = resolve_name(lpcfg_resolve_context(torture->lp_ctx), &name, torture, &address, torture->ev);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to resolve %s - %s\n",
name.name, nt_errstr(status));
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 11a006e42d..c523eeeab4 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -91,7 +91,7 @@ bool torture_domainopen(struct torture_context *torture)
return false;
}
- name.string = lp_workgroup(torture->lp_ctx);
+ name.string = lpcfg_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupinfo.c b/source4/torture/libnet/groupinfo.c
index 772427c323..0858d291e0 100644
--- a/source4/torture/libnet/groupinfo.c
+++ b/source4/torture/libnet/groupinfo.c
@@ -94,7 +94,7 @@ bool torture_groupinfo(struct torture_context *torture)
}
b = p->binding_handle;
- name.string = lp_workgroup(torture->lp_ctx);
+ name.string = lpcfg_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/groupman.c b/source4/torture/libnet/groupman.c
index 02a94a81d7..9ee3dc26fb 100644
--- a/source4/torture/libnet/groupman.c
+++ b/source4/torture/libnet/groupman.c
@@ -71,7 +71,7 @@ bool torture_groupadd(struct torture_context *torture)
torture_assert_ntstatus_ok(torture, status, "RPC connection");
b = p->binding_handle;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, b, &domain_name, mem_ctx, &h, &sid)) {
ret = false;
goto done;
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 1d095fbf5f..87d646cf92 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -59,7 +59,7 @@ bool torture_net_become_dc(struct torture_context *torture)
torture_assert_ntstatus_ok(torture, torture_temp_dir(torture, "libnet_BecomeDC", &location),
"torture_temp_dir should return NT_STATUS_OK" );
- netbios_name = lp_parm_string(torture->lp_ctx, NULL, "become dc", "smbtorture dc");
+ netbios_name = lpcfg_parm_string(torture->lp_ctx, NULL, "become dc", "smbtorture dc");
if (!netbios_name || !netbios_name[0]) {
netbios_name = "smbtorturedc";
}
@@ -67,7 +67,7 @@ bool torture_net_become_dc(struct torture_context *torture)
make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
/* do an initial name resolution to find its IP */
- status = resolve_name(lp_resolve_context(torture->lp_ctx),
+ status = resolve_name(lpcfg_resolve_context(torture->lp_ctx),
&name, torture, &address, torture->ev);
torture_assert_ntstatus_ok(torture, status, talloc_asprintf(torture,
"Failed to resolve %s - %s\n",
@@ -157,7 +157,7 @@ bool torture_net_become_dc(struct torture_context *torture)
"Failed to get loaded dsdb_schema\n");
/* Make sure we get this from the command line */
- if (lp_parm_bool(torture->lp_ctx, NULL, "become dc", "do not unjoin", false)) {
+ if (lpcfg_parm_bool(torture->lp_ctx, NULL, "become dc", "do not unjoin", false)) {
talloc_free(s);
return ret;
}
diff --git a/source4/torture/libnet/libnet_domain.c b/source4/torture/libnet/libnet_domain.c
index 5b747b06da..8cce172192 100644
--- a/source4/torture/libnet/libnet_domain.c
+++ b/source4/torture/libnet/libnet_domain.c
@@ -132,7 +132,7 @@ bool torture_domain_open_lsa(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup(torture->lp_ctx);
+ domain_name = lpcfg_workgroup(torture->lp_ctx);
ctx = libnet_context_init(torture->ev, torture->lp_ctx);
if (ctx == NULL) {
@@ -206,7 +206,7 @@ bool torture_domain_close_lsa(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_opendomain_lsa(torture, p->binding_handle, torture, &h, &domain_name, &access_mask)) {
torture_comment(torture, "failed to open domain on lsa service\n");
@@ -258,7 +258,7 @@ bool torture_domain_open_samr(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup(torture->lp_ctx);
+ domain_name = lpcfg_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
@@ -334,7 +334,7 @@ bool torture_domain_close_samr(struct torture_context *torture)
goto done;
}
- domain_name.string = talloc_strdup(mem_ctx, lp_workgroup(torture->lp_ctx));
+ domain_name.string = talloc_strdup(mem_ctx, lpcfg_workgroup(torture->lp_ctx));
if (!test_opendomain_samr(torture, p->binding_handle, torture, &h, &domain_name, &access_mask, &sid)) {
torture_comment(torture, "failed to open domain on samr service\n");
diff --git a/source4/torture/libnet/libnet_group.c b/source4/torture/libnet/libnet_group.c
index 6acb3d2f60..f76587c108 100644
--- a/source4/torture/libnet/libnet_group.c
+++ b/source4/torture/libnet/libnet_group.c
@@ -53,7 +53,7 @@ bool torture_groupinfo_api(struct torture_context *torture)
return false;
}
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, p->binding_handle, &domain_name, prep_mem_ctx, &h, NULL)) {
ret = false;
goto done;
@@ -116,7 +116,7 @@ bool torture_grouplist(struct torture_context *torture)
ctx = libnet_context_init(torture->ev, torture->lp_ctx);
ctx->cred = cmdline_credentials;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
mem_ctx = talloc_init("torture group list");
ZERO_STRUCT(req);
@@ -180,7 +180,7 @@ bool torture_creategroup(struct torture_context *torture)
ctx->cred = cmdline_credentials;
req.in.group_name = TEST_GROUPNAME;
- req.in.domain_name = lp_workgroup(torture->lp_ctx);
+ req.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
req.out.error_string = NULL;
status = libnet_CreateGroup(ctx, mem_ctx, &req);
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index 128442a070..807e578e83 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -135,7 +135,7 @@ bool torture_lookup_pdc(struct torture_context *torture)
goto done;
}
- lookup->in.domain_name = lp_workgroup(torture->lp_ctx);
+ lookup->in.domain_name = lpcfg_workgroup(torture->lp_ctx);
lookup->in.name_type = NBT_NAME_PDC;
status = libnet_LookupDCs(ctx, mem_ctx, lookup);
@@ -175,7 +175,7 @@ bool torture_lookup_sam_name(struct torture_context *torture)
if (mem_ctx == NULL) return false;
r.in.name = "Administrator";
- r.in.domain_name = lp_workgroup(torture->lp_ctx);
+ r.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
status = libnet_LookupName(ctx, mem_ctx, &r);
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index 5403394740..ca64d62c43 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -163,7 +163,7 @@ bool torture_rpc_connect_pdc(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup(torture->lp_ctx);
+ domain_name = lpcfg_workgroup(torture->lp_ctx);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -183,7 +183,7 @@ bool torture_rpc_connect_dc(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup(torture->lp_ctx);
+ domain_name = lpcfg_workgroup(torture->lp_ctx);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
@@ -203,7 +203,7 @@ bool torture_rpc_connect_dc_info(struct torture_context *torture)
/* we're accessing domain controller so the domain name should be
passed (it's going to be resolved to dc name and address) instead
of specific server name. */
- domain_name = lp_workgroup(torture->lp_ctx);
+ domain_name = lpcfg_workgroup(torture->lp_ctx);
return torture_rpc_connect(torture, level, NULL, domain_name);
}
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index 9dfb1b0ac4..c5af5ed1ab 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -46,7 +46,7 @@ bool torture_createuser(struct torture_context *torture)
}
req.in.user_name = TEST_USERNAME;
- req.in.domain_name = lp_workgroup(torture->lp_ctx);
+ req.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
req.out.error_string = NULL;
status = libnet_CreateUser(ctx, mem_ctx, &req);
@@ -91,7 +91,7 @@ bool torture_deleteuser(struct torture_context *torture)
prep_mem_ctx = talloc_init("prepare test_deleteuser");
req.in.user_name = TEST_USERNAME;
- req.in.domain_name = lp_workgroup(torture->lp_ctx);
+ req.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
status = torture_rpc_connection(torture,
&p,
@@ -101,7 +101,7 @@ bool torture_deleteuser(struct torture_context *torture)
goto done;
}
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, p->binding_handle, &domain_name, prep_mem_ctx, &h, NULL)) {
ret = false;
goto done;
@@ -298,7 +298,7 @@ bool torture_modifyuser(struct torture_context *torture)
name = talloc_strdup(prep_mem_ctx, TEST_USERNAME);
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, b, &domain_name, prep_mem_ctx, &h, NULL)) {
ret = false;
goto done;
@@ -317,7 +317,7 @@ bool torture_modifyuser(struct torture_context *torture)
for (fld = USER_FIELD_FIRST; fld <= USER_FIELD_LAST; fld++) {
ZERO_STRUCT(req);
- req.in.domain_name = lp_workgroup(torture->lp_ctx);
+ req.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
req.in.user_name = name;
set_test_changes(torture, torture, &req, 1, &name, fld);
@@ -330,7 +330,7 @@ bool torture_modifyuser(struct torture_context *torture)
}
ZERO_STRUCT(user_req);
- user_req.in.domain_name = lp_workgroup(torture->lp_ctx);
+ user_req.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
user_req.in.data.user_name = name;
user_req.in.level = USER_INFO_BY_NAME;
@@ -411,7 +411,7 @@ bool torture_userinfo_api(struct torture_context *torture)
}
b = p->binding_handle;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, b, &domain_name, prep_mem_ctx, &h, NULL)) {
ret = false;
goto done;
@@ -474,7 +474,7 @@ bool torture_userlist(struct torture_context *torture)
ctx = libnet_context_init(torture->ev, torture->lp_ctx);
ctx->cred = cmdline_credentials;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
mem_ctx = talloc_init("torture user list");
ZERO_STRUCT(req);
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c
index 686f1f13f3..042212f4aa 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -133,7 +133,7 @@ bool torture_userinfo(struct torture_context *torture)
}
b = p->binding_handle;
- name.string = lp_workgroup(torture->lp_ctx);
+ name.string = lpcfg_workgroup(torture->lp_ctx);
/*
* Testing synchronous version
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index 42664a3ae4..13fc98dd48 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -325,7 +325,7 @@ bool torture_useradd(struct torture_context *torture)
torture_assert_ntstatus_ok(torture, status, "RPC connect failed");
b = p->binding_handle;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, b, &domain_name, mem_ctx, &h, &sid)) {
ret = false;
goto done;
@@ -386,7 +386,7 @@ bool torture_userdel(struct torture_context *torture)
}
b = p->binding_handle;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
if (!test_domain_open(torture, b, &domain_name, mem_ctx, &h, &sid)) {
ret = false;
goto done;
@@ -431,7 +431,7 @@ bool torture_usermod(struct torture_context *torture)
torture_assert_ntstatus_ok(torture, status, "RPC connect");
b = p->binding_handle;
- domain_name.string = lp_workgroup(torture->lp_ctx);
+ domain_name.string = lpcfg_workgroup(torture->lp_ctx);
name = talloc_strdup(mem_ctx, TEST_USERNAME);
if (!test_domain_open(torture, b, &domain_name, mem_ctx, &h, &sid)) {
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index dabf083bff..f66688dd54 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -177,7 +177,7 @@ static bool test_ldb_speed(struct torture_context *torture, const void *_data)
torture_comment(torture, "Testing ldb speed for sidmap\n");
- ldb = ldb_wrap_connect(tmp_ctx, torture->ev, torture->lp_ctx, "tdb://test.ldb",
+ ldb = ldb_wrap_connect(tmp_ctx, torture->ev, torture->lp_ctx, "tdb://test.ldb",
NULL, NULL, LDB_FLG_NOSYNC);
if (!ldb) {
torture_result(torture, TORTURE_FAIL, "Failed to open test.ldb");
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index a09b54cfd6..7a236be463 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -118,8 +118,8 @@ static struct smbcli_state *connect_one(struct tevent_context *ev,
struct smbcli_options options;
struct smbcli_session_options session_options;
- lp_smbcli_options(lp_ctx, &options);
- lp_smbcli_session_options(lp_ctx, &session_options);
+ lpcfg_smbcli_options(lp_ctx, &options);
+ lpcfg_smbcli_session_options(lp_ctx, &session_options);
printf("connect_one(%s, %d, %d)\n", share, snum, conn);
@@ -133,7 +133,7 @@ static struct smbcli_state *connect_one(struct tevent_context *ev,
char **unc_list = NULL;
int num_unc_names;
const char *p;
- p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
+ p = lpcfg_parm_string(lp_ctx, NULL, "torture", "unclist");
if (p) {
char *h, *s;
unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
@@ -161,13 +161,13 @@ static struct smbcli_state *connect_one(struct tevent_context *ev,
printf("\\\\%s\\%s\n", server, share);
status = smbcli_full_connection(NULL, &c,
server,
- lp_smb_ports(lp_ctx),
+ lpcfg_smb_ports(lp_ctx),
share, NULL,
- lp_socket_options(lp_ctx),
+ lpcfg_socket_options(lp_ctx),
servers[snum],
- lp_resolve_context(lp_ctx),
+ lpcfg_resolve_context(lp_ctx),
ev, &options, &session_options,
- lp_gensec_settings(mem_ctx, lp_ctx));
+ lpcfg_gensec_settings(mem_ctx, lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
sleep(2);
}
@@ -200,7 +200,7 @@ static void reconnect(struct tevent_context *ev,
}
talloc_free(cli[server][conn]);
}
- cli[server][conn] = connect_one(ev, lp_ctx, mem_ctx, share[server],
+ cli[server][conn] = connect_one(ev, lp_ctx, mem_ctx, share[server],
server, conn);
if (!cli[server][conn]) {
DEBUG(0,("Failed to connect to %s\n", share[server]));
@@ -598,7 +598,7 @@ static void usage(poptContext pc)
while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_UNCLIST:
- lp_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
break;
case 'U':
if (username_count == 2) {
diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c
index 2cf28c3554..7364d6df2f 100644
--- a/source4/torture/locktest2.c
+++ b/source4/torture/locktest2.c
@@ -173,7 +173,7 @@ static struct smbcli_state *connect_one(TALLOC_CTX *mem_ctx,
nt_status = smbcli_full_connection(NULL,
&c, myname, server_n, ports, share, NULL,
- username, lp_workgroup(), password, ev,
+ username, lpcfg_workgroup(), password, ev,
options, session_options, gensec_settings);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0, ("smbcli_full_connection failed with error %s\n", nt_errstr(nt_status)));
@@ -513,7 +513,7 @@ static void usage(void)
argv += 4;
lp_ctx = loadparm_init(mem_ctx);
- lp_load(lp_ctx, dyn_CONFIGFILE);
+ lpcfg_load(lp_ctx, dyn_CONFIGFILE);
if (getenv("USER")) {
username = talloc_strdup(mem_ctx, getenv("USER"));
@@ -568,11 +568,11 @@ static void usage(void)
ev = s4_event_context_init(mem_ctx);
locking_init(1);
- lp_smbcli_options(lp_ctx, &options);
- lp_smbcli_session_options(lp_ctx, &session_options);
+ lpcfg_smbcli_options(lp_ctx, &options);
+ lpcfg_smbcli_session_options(lp_ctx, &session_options);
test_locks(mem_ctx, share1, share2, nfspath1, nfspath2,
- lp_smb_ports(lp_ctx),
- &options, &session_options, lp_gensec_settings(lp_ctx), ev);
+ lpcfg_smb_ports(lp_ctx),
+ &options, &session_options, lpcfg_gensec_settings(lp_ctx), ev);
return(0);
}
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index e61eb868a4..9c66291087 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -331,7 +331,7 @@ static void usage(poptContext pc)
while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_UNCLIST:
- lp_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
break;
}
}
@@ -364,13 +364,13 @@ static void usage(poptContext pc)
gensec_init(lp_ctx);
- lp_smbcli_options(lp_ctx, &options);
- lp_smbcli_session_options(lp_ctx, &session_options);
+ lpcfg_smbcli_options(lp_ctx, &options);
+ lpcfg_smbcli_session_options(lp_ctx, &session_options);
- cli = connect_one(lp_resolve_context(lp_ctx), ev, mem_ctx, share,
- lp_smb_ports(lp_ctx), lp_socket_options(lp_ctx),
+ cli = connect_one(lpcfg_resolve_context(lp_ctx), ev, mem_ctx, share,
+ lpcfg_smb_ports(lp_ctx), lpcfg_socket_options(lp_ctx),
&options, &session_options,
- lp_gensec_settings(mem_ctx, lp_ctx));
+ lpcfg_gensec_settings(mem_ctx, lp_ctx));
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
exit(1);
diff --git a/source4/torture/nbt/browse.c b/source4/torture/nbt/browse.c
index a0e7b7d9ca..dcf96ba3ef 100644
--- a/source4/torture/nbt/browse.c
+++ b/source4/torture/nbt/browse.c
@@ -35,7 +35,7 @@ bool torture_nbt_browse(struct torture_context *torture)
NTSTATUS status;
bool ret = true;
- name.name = lp_workgroup();
+ name.name = lpcfg_workgroup();
name.type = NBT_NAME_BROWSER;
name.scope = NULL;
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 7d1199ec2a..4c0fe4bd77 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -80,21 +80,21 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
struct interface *ifaces;
- name.name = lp_workgroup(tctx->lp_ctx);
+ name.name = lpcfg_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
/* do an initial name resolution to find its IP */
torture_assert_ntstatus_ok(tctx,
- resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+ resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(tctx->lp_ctx));
+ myaddress, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -127,7 +127,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -173,20 +173,20 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
struct cli_credentials *machine_credentials;
const struct dom_sid *dom_sid;
- name.name = lp_workgroup(tctx->lp_ctx);
+ name.name = lpcfg_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
/* do an initial name resolution to find its IP */
torture_assert_ntstatus_ok(tctx,
- resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+ resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(tctx->lp_ctx));
+ myaddress, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -221,7 +221,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -260,7 +260,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -288,7 +288,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, join_ctx != NULL,
talloc_asprintf(tctx, "Failed to join domain %s as %s\n",
- lp_workgroup(tctx->lp_ctx), TEST_NAME));
+ lpcfg_workgroup(tctx->lp_ctx), TEST_NAME));
dom_sid = torture_join_sid(join_ctx);
@@ -310,7 +310,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -353,7 +353,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -392,7 +392,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock, &name, dest,
@@ -442,20 +442,20 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
struct interface *ifaces;
- name.name = lp_workgroup(tctx->lp_ctx);
+ name.name = lpcfg_workgroup(tctx->lp_ctx);
name.type = NBT_NAME_LOGON;
name.scope = NULL;
/* do an initial name resolution to find its IP */
torture_assert_ntstatus_ok(tctx,
- resolve_name(lp_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
+ resolve_name(lpcfg_resolve_context(tctx->lp_ctx), &name, tctx, &address, tctx->ev),
talloc_asprintf(tctx, "Failed to resolve %s", name.name));
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = talloc_strdup(dgmsock, iface_best_ip(ifaces, address));
socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- myaddress, lp_dgram_port(tctx->lp_ctx));
+ myaddress, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL, "Error getting address");
/* try receiving replies on port 138 first, which will only
@@ -478,7 +478,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
torture_assert(tctx, join_ctx != NULL,
talloc_asprintf(tctx, "Failed to join domain %s as %s\n",
- lp_workgroup(tctx->lp_ctx), TEST_NAME));
+ lpcfg_workgroup(tctx->lp_ctx), TEST_NAME));
/* setup a temporary mailslot listener for replies */
dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC,
@@ -501,7 +501,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock,
&name, dest,
@@ -545,7 +545,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock,
&name, dest,
@@ -585,7 +585,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock,
&name, dest,
@@ -622,7 +622,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
make_nbt_name_client(&myname, TEST_NAME);
dest = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
- address, lp_dgram_port(tctx->lp_ctx));
+ address, lpcfg_dgram_port(tctx->lp_ctx));
torture_assert(tctx, dest != NULL, "Error getting address");
status = dgram_mailslot_netlogon_send(dgmsock,
&name, dest,
diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c
index 1dcfa563df..6ea31dae86 100644
--- a/source4/torture/nbt/nbt.c
+++ b/source4/torture/nbt/nbt.c
@@ -39,7 +39,7 @@ bool torture_nbt_get_name(struct torture_context *tctx,
/* do an initial name resolution to find its IP */
torture_assert_ntstatus_ok(tctx,
- resolve_name(lp_resolve_context(tctx->lp_ctx), name, tctx, address, tctx->ev),
+ resolve_name(lpcfg_resolve_context(tctx->lp_ctx), name, tctx, address, tctx->ev),
talloc_asprintf(tctx,
"Failed to resolve %s", name->name));
diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c
index b1b703a3c2..a05e34c0e6 100644
--- a/source4/torture/nbt/query.c
+++ b/source4/torture/nbt/query.c
@@ -62,7 +62,7 @@ static bool bench_namequery(struct torture_context *tctx)
io.in.name = name;
io.in.dest_addr = address;
- io.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.broadcast = false;
io.in.wins_lookup = false;
io.in.timeout = 1;
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index 8ddea4096e..eadee9b44d 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -54,7 +54,7 @@ static bool nbt_register_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = iface_best_ip(ifaces, address);
@@ -70,7 +70,7 @@ static bool nbt_register_own(struct torture_context *tctx)
io.in.name = name;
io.in.dest_addr = address;
- io.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.address = myaddress;
io.in.nb_flags = NBT_NODE_B | NBT_NM_ACTIVE;
io.in.register_demand = false;
@@ -123,7 +123,7 @@ static bool nbt_refresh_own(struct torture_context *tctx)
if (!torture_nbt_get_name(tctx, &name, &address))
return false;
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = iface_best_ip(ifaces, address);
@@ -140,7 +140,7 @@ static bool nbt_refresh_own(struct torture_context *tctx)
io.in.name = name;
io.in.dest_addr = address;
- io.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.address = myaddress;
io.in.nb_flags = NBT_NODE_B | NBT_NM_ACTIVE;
io.in.broadcast = false;
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index b372de8a55..fd8463a936 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -65,13 +65,13 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
struct interface *ifaces;
bool low_port = try_low_port;
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
myaddress = talloc_strdup(tctx, iface_best_ip(ifaces, address));
socket_address = socket_address_from_strings(tctx,
nbtsock->sock->backend_name,
- myaddress, lp_nbt_port(tctx->lp_ctx));
+ myaddress, lpcfg_nbt_port(tctx->lp_ctx));
torture_assert(tctx, socket_address != NULL,
"Error getting address");
@@ -98,7 +98,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "release the name\n");
release.in.name = *name;
- release.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release.in.dest_addr = address;
release.in.address = myaddress;
release.in.nb_flags = nb_flags;
@@ -117,7 +117,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
} else {
torture_comment(tctx, "register the name with a wrong address (makes the next request slow!)\n");
io.in.name = *name;
- io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.wins_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.wins_servers = const_str_list(
str_list_make_single(tctx, address));
io.in.addresses = const_str_list(
@@ -140,7 +140,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "register the name correct address\n");
name_register.in.name = *name;
- name_register.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ name_register.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
name_register.in.dest_addr = address;
name_register.in.address = myaddress;
name_register.in.nb_flags = nb_flags;
@@ -191,7 +191,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "register the name correct address\n");
io.in.name = *name;
- io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.wins_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.wins_servers = (const char **)str_list_make_single(tctx, address);
io.in.addresses = (const char **)str_list_make_single(tctx, myaddress);
io.in.nb_flags = nb_flags;
@@ -222,7 +222,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "query the name to make sure its there\n");
query.in.name = *name;
query.in.dest_addr = address;
- query.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ query.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
query.in.broadcast = false;
query.in.wins_lookup = true;
query.in.timeout = 3;
@@ -268,7 +268,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "refresh the name\n");
refresh.in.name = *name;
- refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx);
+ refresh.in.wins_port = lpcfg_nbt_port(tctx->lp_ctx);
refresh.in.wins_servers = (const char **)str_list_make_single(tctx, address);
refresh.in.addresses = (const char **)str_list_make_single(tctx, myaddress);
refresh.in.nb_flags = nb_flags;
@@ -289,7 +289,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
printf("release the name\n");
release.in.name = *name;
- release.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release.in.dest_addr = address;
release.in.address = myaddress;
release.in.nb_flags = nb_flags;
@@ -317,7 +317,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
} else {
torture_comment(tctx, "register the name with a wrong address (makes the next request slow!)\n");
io.in.name = *name;
- io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
+ io.in.wins_port = lpcfg_nbt_port(tctx->lp_ctx);
io.in.wins_servers = const_str_list(
str_list_make_single(tctx, address));
io.in.addresses = const_str_list(
@@ -341,7 +341,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "refresh the name with the correct address\n");
refresh.in.name = *name;
- refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx);
+ refresh.in.wins_port = lpcfg_nbt_port(tctx->lp_ctx);
refresh.in.wins_servers = const_str_list(
str_list_make_single(tctx, address));
refresh.in.addresses = const_str_list(
@@ -364,7 +364,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "release the name\n");
release.in.name = *name;
- release.in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release.in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release.in.dest_addr = address;
release.in.address = myaddress;
release.in.nb_flags = nb_flags;
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index 226f388f35..c77c63544c 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -245,8 +245,8 @@ static bool bench_wins(struct torture_context *tctx)
state->num_names = torture_entries;
state->registered = talloc_zero_array(state, bool, state->num_names);
state->wins_server = address;
- state->wins_port = lp_nbt_port(tctx->lp_ctx);
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ state->wins_port = lpcfg_nbt_port(tctx->lp_ctx);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
state->my_ip = talloc_strdup(tctx, iface_best_ip(ifaces, address));
state->ttl = timelimit;
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index b8152f79d6..a0d4c23ae7 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -615,7 +615,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev);
if (!ctx->nbtsock) return NULL;
- load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+ load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_best_ip(ifaces, address), 0);
if (!ctx->myaddr) return NULL;
@@ -634,7 +634,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
if (!ctx->nbtsock_srv) return NULL;
/* Make a port 137 version of ctx->myaddr */
- nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lp_nbt_port(tctx->lp_ctx));
+ nbt_srv_addr = socket_address_from_strings(tctx, ctx->nbtsock_srv->sock->backend_name, ctx->myaddr->addr, lpcfg_nbt_port(tctx->lp_ctx));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -660,7 +660,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
nbt_srv_addr = socket_address_from_strings(tctx,
ctx->nbtsock_srv->sock->backend_name,
ctx->myaddr2->addr,
- lp_nbt_port(tctx->lp_ctx));
+ lpcfg_nbt_port(tctx->lp_ctx));
if (!nbt_srv_addr) return NULL;
/* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
@@ -6587,7 +6587,7 @@ static bool test_conflict_owned_released_vs_replica(struct torture_context *tctx
*/
name_register->in.name = records[i].name;
name_register->in.dest_addr = ctx->address;
- name_register->in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ name_register->in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
name_register->in.address = records[i].wins.ips[0].ip;
name_register->in.nb_flags = records[i].wins.nb_flags;
name_register->in.register_demand= false;
@@ -6616,7 +6616,7 @@ static bool test_conflict_owned_released_vs_replica(struct torture_context *tctx
/* release the record */
release->in.name = records[i].name;
- release->in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release->in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release->in.dest_addr = ctx->address;
release->in.address = records[i].wins.ips[0].ip;
release->in.nb_flags = records[i].wins.nb_flags;
@@ -6672,7 +6672,7 @@ static bool test_conflict_owned_released_vs_replica(struct torture_context *tctx
} else {
release->in.name = records[i].name;
release->in.dest_addr = ctx->address;
- release->in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release->in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release->in.address = records[i].wins.ips[0].ip;
release->in.nb_flags = records[i].wins.nb_flags;
release->in.broadcast = false;
@@ -9213,7 +9213,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
if (!ctx->nbtsock_srv) {
torture_comment(tctx, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
- lp_nbt_port(tctx->lp_ctx));
+ lpcfg_nbt_port(tctx->lp_ctx));
return true;
}
@@ -9275,7 +9275,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
name_register->in.name = records[i].name;
name_register->in.dest_addr = ctx->address;
- name_register->in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ name_register->in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
name_register->in.address = records[i].wins.ips[j].ip;
name_register->in.nb_flags = records[i].wins.nb_flags;
name_register->in.register_demand= false;
@@ -9422,7 +9422,7 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx,
release->in.name = records[i].name;
release->in.dest_addr = ctx->address;
- release->in.dest_port = lp_nbt_port(tctx->lp_ctx);
+ release->in.dest_port = lpcfg_nbt_port(tctx->lp_ctx);
release->in.address = records[i].wins.ips[j].ip;
release->in.nb_flags = records[i].wins.nb_flags;
release->in.broadcast = false;
diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c
index 9b4b9c3a4e..ca5fb14c6e 100644
--- a/source4/torture/ntp/ntp_signd.c
+++ b/source4/torture/ntp/ntp_signd.c
@@ -154,7 +154,7 @@ static bool test_ntp_signd(struct torture_context *tctx,
unix_address = talloc_asprintf(signd_client,
"%s/socket",
- lp_ntp_signd_socket_directory(tctx->lp_ctx));
+ lpcfg_ntp_signd_socket_directory(tctx->lp_ctx));
rc = tsocket_address_unix_from_path(mem_ctx,
unix_address,
&signd_client->remote_address);
diff --git a/source4/torture/rap/sam.c b/source4/torture/rap/sam.c
index 144abaabf2..34e8742068 100644
--- a/source4/torture/rap/sam.c
+++ b/source4/torture/rap/sam.c
@@ -61,7 +61,7 @@ static bool test_userpasswordset2_args(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetUserPasswordSet2(%s)\n", r.in.UserName);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netuserpasswordset2(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netuserpasswordset2(cli->tree, lpcfg_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netuserpasswordset2 failed");
if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) {
torture_warning(tctx, "RAP NetUserPasswordSet2 gave: %s\n",
@@ -92,7 +92,7 @@ static bool test_userpasswordset2_crypt_args(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetUserPasswordSet2(%s)\n", r.in.UserName);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netuserpasswordset2(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netuserpasswordset2(cli->tree, lpcfg_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netuserpasswordset2 failed");
if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) {
torture_warning(tctx, "RAP NetUserPasswordSet2 gave: %s\n",
@@ -151,7 +151,7 @@ static bool test_oemchangepassword_args(struct torture_context *tctx,
torture_comment(tctx, "Testing rap_NetOEMChangePassword(%s)\n", r.in.UserName);
torture_assert_ntstatus_ok(tctx,
- smbcli_rap_netoemchangepassword(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ smbcli_rap_netoemchangepassword(cli->tree, lpcfg_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netoemchangepassword failed");
if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) {
torture_warning(tctx, "RAP NetOEMChangePassword gave: %s\n",
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index bcc030b5ab..3a828d868a 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -154,18 +154,18 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct
}
io2.in.dest_host = torture_setting_string(tctx, "host", NULL);
- io2.in.ports = lp_smb_ports(tctx->lp_ctx);
+ io2.in.ports = lpcfg_smb_ports(tctx->lp_ctx);
io2.in.called_name = torture_setting_string(tctx, "host", NULL);
io2.in.service = torture_setting_string(tctx, "share", NULL);
io2.in.service_type = "A:";
io2.in.credentials = cmdline_credentials;
- io2.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ io2.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
io2.in.filename = fname;
- io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx);
- io2.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
- lp_smbcli_options(tctx->lp_ctx, &io2.in.options);
- lp_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options);
+ io2.in.resolve_ctx = lpcfg_resolve_context(tctx->lp_ctx);
+ io2.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
+ lpcfg_smbcli_options(tctx->lp_ctx, &io2.in.options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options);
printf("Testing parallel fetchfile with %d ops\n", torture_numops);
@@ -346,15 +346,15 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
bool ret = true;
io1.in.dest_host = torture_setting_string(tctx, "host", NULL);
- io1.in.dest_ports = lp_smb_ports(tctx->lp_ctx);
- io1.in.socket_options = lp_socket_options(tctx->lp_ctx);
+ io1.in.dest_ports = lpcfg_smb_ports(tctx->lp_ctx);
+ io1.in.socket_options = lpcfg_socket_options(tctx->lp_ctx);
io1.in.called_name = torture_setting_string(tctx, "host", NULL);
io1.in.service = torture_setting_string(tctx, "share", NULL);
io1.in.service_type = "A:";
io1.in.credentials = cmdline_credentials;
- io1.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ io1.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
io1.in.level = RAW_QFS_OBJECTID_INFORMATION;
- io1.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ io1.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
printf("Testing parallel queryfsinfo [Object ID] with %d ops\n",
torture_numops);
@@ -363,7 +363,7 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
c = talloc_array(tctx, struct composite_context *, torture_numops);
for (i=0; i<torture_numops; i++) {
- c[i] = smb_composite_fsinfo_send(cli->tree, &io1, lp_resolve_context(tctx->lp_ctx));
+ c[i] = smb_composite_fsinfo_send(cli->tree, &io1, lpcfg_resolve_context(tctx->lp_ctx));
c[i]->async.fn = loadfile_complete;
c[i]->async.private_data = count;
}
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 1335b7d461..cda8b15d8d 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -89,14 +89,14 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
printf("create a second security context on the same transport\n");
- lp_smbcli_session_options(tctx->lp_ctx, &options);
- gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &options);
+ gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
session = smbcli_session_init(cli->transport, tctx, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
setup.in.gensec_settings = gensec_settings;
@@ -112,7 +112,7 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
session2->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
@@ -139,7 +139,7 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
session3->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
@@ -152,7 +152,7 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
session4->vuid = session->vuid;
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
anon_creds = cli_credentials_init(tctx);
cli_credentials_set_conf(anon_creds, tctx->lp_ctx);
@@ -229,7 +229,7 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
for (i=0; i <ARRAY_SIZE(sessions); i++) {
setups[i].in.sesskey = cli->transport->negotiate.sesskey;
setups[i].in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setups[i].in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setups[i].in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setups[i].in.credentials = cmdline_credentials;
setups[i].in.gensec_settings = gensec_settings;
@@ -394,15 +394,15 @@ static bool test_tree_ulogoff(struct smbcli_state *cli, struct torture_context *
share = torture_setting_string(tctx, "share", NULL);
host = torture_setting_string(tctx, "host", NULL);
- lp_smbcli_session_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &options);
printf("create the first new sessions\n");
session1 = smbcli_session_init(cli->transport, tctx, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
- setup.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ setup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
status = smb_composite_sesssetup(session1, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
session1->vuid = setup.out.vuid;
@@ -457,9 +457,9 @@ static bool test_tree_ulogoff(struct smbcli_state *cli, struct torture_context *
session2 = smbcli_session_init(cli->transport, tctx, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
- setup.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ setup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
status = smb_composite_sesssetup(session2, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
session2->vuid = setup.out.vuid;
@@ -651,16 +651,16 @@ static bool test_pid_2sess(struct smbcli_state *cli, struct torture_context *tct
return false;
}
- lp_smbcli_session_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &options);
printf("create a second security context on the same transport\n");
session = smbcli_session_init(cli->transport, tctx, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities; /* ignored in secondary session setup, except by our libs, which care about the extended security bit */
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
- setup.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ setup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
status = smb_composite_sesssetup(session, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -903,9 +903,9 @@ bool torture_raw_context(struct torture_context *torture,
struct smbcli_state *cli)
{
bool ret = true;
- if (lp_use_spnego(torture->lp_ctx)) {
+ if (lpcfg_use_spnego(torture->lp_ctx)) {
ret &= torture_raw_context_int(torture, cli);
- lp_set_cmdline(torture->lp_ctx, "use spnego", "False");
+ lpcfg_set_cmdline(torture->lp_ctx, "use spnego", "False");
}
ret &= torture_raw_context_int(torture, cli);
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 02076dfbb8..1d25fb4b3a 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -513,7 +513,7 @@ static bool test_async(struct torture_context *tctx,
return false;
}
- lp_smbcli_session_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_session_options(tctx->lp_ctx, &options);
torture_comment(tctx, "Testing LOCKING_ANDX_CANCEL_LOCK\n");
io.generic.level = RAW_LOCK_LOCKX;
@@ -802,9 +802,9 @@ static bool test_async(struct torture_context *tctx,
session = smbcli_session_init(cli->transport, tctx, false, options);
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
- setup.in.workgroup = lp_workgroup(tctx->lp_ctx);
+ setup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx);
setup.in.credentials = cmdline_credentials;
- setup.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ setup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx);
status = smb_composite_sesssetup(session, &setup);
CHECK_STATUS(status, NT_STATUS_OK);
session->vuid = setup.out.vuid;
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index 315e4241f9..91ce67dbd3 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -187,23 +187,23 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
io->in.dest_host = state->dest_host;
io->in.dest_ports = state->dest_ports;
- io->in.gensec_settings = lp_gensec_settings(state->mem_ctx, state->tctx->lp_ctx);
- io->in.socket_options = lp_socket_options(state->tctx->lp_ctx);
+ io->in.gensec_settings = lpcfg_gensec_settings(state->mem_ctx, state->tctx->lp_ctx);
+ io->in.socket_options = lpcfg_socket_options(state->tctx->lp_ctx);
io->in.called_name = state->called_name;
io->in.service = share;
io->in.service_type = state->service_type;
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = false;
- io->in.workgroup = lp_workgroup(state->tctx->lp_ctx);
- lp_smbcli_options(state->tctx->lp_ctx, &io->in.options);
- lp_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options);
+ io->in.workgroup = lpcfg_workgroup(state->tctx->lp_ctx);
+ lpcfg_smbcli_options(state->tctx->lp_ctx, &io->in.options);
+ lpcfg_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
state->tree = NULL;
ctx = smb_composite_connect_send(io, state->mem_ctx,
- lp_resolve_context(state->tctx->lp_ctx),
+ lpcfg_resolve_context(state->tctx->lp_ctx),
state->ev);
if (ctx == NULL) {
DEBUG(0,("Failed to setup async reconnect\n"));
diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c
index 837b7c345a..749d157c31 100644
--- a/source4/torture/raw/openbench.c
+++ b/source4/torture/raw/openbench.c
@@ -130,16 +130,16 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
io->in.dest_host = state->dest_host;
io->in.dest_ports = state->dest_ports;
- io->in.socket_options = lp_socket_options(state->tctx->lp_ctx);
+ io->in.socket_options = lpcfg_socket_options(state->tctx->lp_ctx);
io->in.called_name = state->called_name;
io->in.service = share;
io->in.service_type = state->service_type;
io->in.credentials = cmdline_credentials;
io->in.fallback_to_anonymous = false;
- io->in.workgroup = lp_workgroup(state->tctx->lp_ctx);
- io->in.gensec_settings = lp_gensec_settings(state->mem_ctx, state->tctx->lp_ctx);
- lp_smbcli_options(state->tctx->lp_ctx, &io->in.options);
- lp_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options);
+ io->in.workgroup = lpcfg_workgroup(state->tctx->lp_ctx);
+ io->in.gensec_settings = lpcfg_gensec_settings(state->mem_ctx, state->tctx->lp_ctx);
+ lpcfg_smbcli_options(state->tctx->lp_ctx, &io->in.options);
+ lpcfg_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options);
/* kill off the remnants of the old connection */
talloc_free(state->tree);
@@ -148,7 +148,7 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
state->close_fnum = -1;
ctx = smb_composite_connect_send(io, state->mem_ctx,
- lp_resolve_context(state->tctx->lp_ctx),
+ lpcfg_resolve_context(state->tctx->lp_ctx),
state->ev);
if (ctx == NULL) {
DEBUG(0,("Failed to setup async reconnect\n"));
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 2a1d8e5ace..835a1b27b6 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -176,19 +176,19 @@ static bool open_connection_no_level2_oplocks(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);
options.use_level2_oplocks = false;
status = smbcli_full_connection(tctx, c,
torture_setting_string(tctx, "host", NULL),
- lp_smb_ports(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx),
torture_setting_string(tctx, "share", NULL),
- NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
- lp_resolve_context(tctx->lp_ctx),
+ NULL, lpcfg_socket_options(tctx->lp_ctx), cmdline_credentials,
+ 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));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(tctx, "Failed to open connection - %s\n",
nt_errstr(status));
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index ca2254b634..603c9f6f03 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -346,9 +346,9 @@ bool torture_samba3_badpath(struct torture_context *torture)
return false;
}
- nt_status_support = lp_nt_status_support(torture->lp_ctx);
+ nt_status_support = lpcfg_nt_status_support(torture->lp_ctx);
- if (!lp_set_cmdline(torture->lp_ctx, "nt status support", "yes")) {
+ if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes")) {
printf("Could not set 'nt status support = yes'\n");
goto fail;
}
@@ -357,7 +357,7 @@ bool torture_samba3_badpath(struct torture_context *torture)
goto fail;
}
- if (!lp_set_cmdline(torture->lp_ctx, "nt status support", "no")) {
+ if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no")) {
printf("Could not set 'nt status support = yes'\n");
goto fail;
}
@@ -366,7 +366,7 @@ bool torture_samba3_badpath(struct torture_context *torture)
goto fail;
}
- if (!lp_set_cmdline(torture->lp_ctx, "nt status support",
+ if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support",
nt_status_support ? "yes":"no")) {
printf("Could not reset 'nt status support = yes'");
goto fail;
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index 66fc3c01d6..7202943969 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -70,8 +70,8 @@ static int fork_tcon_client(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);
child = fork();
if (child == -1) {
@@ -98,11 +98,11 @@ static int fork_tcon_client(struct torture_context *tctx,
NTSTATUS status;
status = smbcli_full_connection(NULL, &cli,
- host, lp_smb_ports(tctx->lp_ctx), share,
- NULL, lp_socket_options(tctx->lp_ctx), cmdline_credentials,
- lp_resolve_context(tctx->lp_ctx),
+ host, lpcfg_smb_ports(tctx->lp_ctx), share,
+ NULL, lpcfg_socket_options(tctx->lp_ctx), cmdline_credentials,
+ 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));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",
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;
diff --git a/source4/torture/shell.c b/source4/torture/shell.c
index 3f48075dba..7c313af178 100644
--- a/source4/torture/shell.c
+++ b/source4/torture/shell.c
@@ -179,14 +179,14 @@ static void shell_set(const struct shell_command *command,
switch (argc) {
case 0:
- lp_dump(tctx->lp_ctx, stdout,
+ lpcfg_dump(tctx->lp_ctx, stdout,
false /* show_defaults */,
0 /* skip services */);
break;
case 2:
name = talloc_asprintf(NULL, "torture:%s", argv[0]);
- lp_set_cmdline(tctx->lp_ctx, name, argv[1]);
+ lpcfg_set_cmdline(tctx->lp_ctx, name, argv[1]);
talloc_free(name);
break;
diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c
index 12f16cb166..aa0b92dc80 100644
--- a/source4/torture/smb2/oplock.c
+++ b/source4/torture/smb2/oplock.c
@@ -284,15 +284,15 @@ static bool open_smb2_connection_no_level2_oplocks(struct torture_context *tctx,
struct cli_credentials *credentials = cmdline_credentials;
struct smbcli_options options;
- lp_smbcli_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_options(tctx->lp_ctx, &options);
options.use_level2_oplocks = false;
status = smb2_connect(tctx, host,
- lp_smb_ports(tctx->lp_ctx), share,
- lp_resolve_context(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx), share,
+ lpcfg_resolve_context(tctx->lp_ctx),
credentials, tree, tctx->ev, &options,
- lp_socket_options(tctx->lp_ctx),
- lp_gensec_settings(tctx, tctx->lp_ctx));
+ lpcfg_socket_options(tctx->lp_ctx),
+ lpcfg_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(tctx, "Failed to connect to SMB2 share "
"\\\\%s\\%s - %s\n", host, share,
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index a173c6debb..3b132ab8a4 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -201,15 +201,15 @@ bool torture_smb2_scan(struct torture_context *torture)
struct smb2_request *req;
struct smbcli_options options;
- lp_smbcli_options(torture->lp_ctx, &options);
+ lpcfg_smbcli_options(torture->lp_ctx, &options);
status = smb2_connect(mem_ctx, host,
- lp_smb_ports(torture->lp_ctx),
+ lpcfg_smb_ports(torture->lp_ctx),
share,
- lp_resolve_context(torture->lp_ctx),
+ lpcfg_resolve_context(torture->lp_ctx),
credentials, &tree, torture->ev, &options,
- lp_socket_options(torture->lp_ctx),
- lp_gensec_settings(torture, torture->lp_ctx));
+ lpcfg_socket_options(torture->lp_ctx),
+ lpcfg_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Connection failed - %s\n", nt_errstr(status));
return false;
@@ -224,12 +224,12 @@ bool torture_smb2_scan(struct torture_context *torture)
if (!smb2_request_receive(req)) {
talloc_free(tree);
status = smb2_connect(mem_ctx, host,
- lp_smb_ports(torture->lp_ctx),
+ lpcfg_smb_ports(torture->lp_ctx),
share,
- lp_resolve_context(torture->lp_ctx),
+ lpcfg_resolve_context(torture->lp_ctx),
credentials, &tree, torture->ev, &options,
- lp_socket_options(torture->lp_ctx),
- lp_gensec_settings(mem_ctx, torture->lp_ctx));
+ lpcfg_socket_options(torture->lp_ctx),
+ lpcfg_gensec_settings(mem_ctx, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Connection failed - %s\n", nt_errstr(status));
return false;
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 1dc8fca2b0..96981125c2 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -270,16 +270,16 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr
struct cli_credentials *credentials = cmdline_credentials;
struct smbcli_options options;
- lp_smbcli_options(tctx->lp_ctx, &options);
+ lpcfg_smbcli_options(tctx->lp_ctx, &options);
status = smb2_connect(tctx, host,
- lp_smb_ports(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx),
share,
- lp_resolve_context(tctx->lp_ctx),
+ lpcfg_resolve_context(tctx->lp_ctx),
credentials, tree,
tctx->ev, &options,
- lp_socket_options(tctx->lp_ctx),
- lp_gensec_settings(tctx, tctx->lp_ctx)
+ lpcfg_socket_options(tctx->lp_ctx),
+ lpcfg_gensec_settings(tctx, tctx->lp_ctx)
);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to SMB2 share \\\\%s\\%s - %s\n",
diff --git a/source4/torture/smbiconv.c b/source4/torture/smbiconv.c
index 173f37175b..f1a7d899a5 100644
--- a/source4/torture/smbiconv.c
+++ b/source4/torture/smbiconv.c
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
}
}
- cd = smb_iconv_open_ex(tctx, to, from, lp_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true));
+ cd = smb_iconv_open_ex(tctx, to, from, lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true));
if((int)cd == -1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
if (out != stdout) fclose(out);
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 978659990e..a4d206b5bc 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -135,14 +135,14 @@ bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
d_printf("Invalid option: %s is not a valid torture target (share or binding string)\n\n", target);
return false;
}
- lp_set_cmdline(lp_ctx, "torture:host", binding_struct->host);
- if (lp_parm_string(lp_ctx, NULL, "torture", "share") == NULL)
- lp_set_cmdline(lp_ctx, "torture:share", "IPC$");
- lp_set_cmdline(lp_ctx, "torture:binding", target);
+ lpcfg_set_cmdline(lp_ctx, "torture:host", binding_struct->host);
+ if (lpcfg_parm_string(lp_ctx, NULL, "torture", "share") == NULL)
+ lpcfg_set_cmdline(lp_ctx, "torture:share", "IPC$");
+ lpcfg_set_cmdline(lp_ctx, "torture:binding", target);
} else {
- lp_set_cmdline(lp_ctx, "torture:host", host);
- lp_set_cmdline(lp_ctx, "torture:share", share);
- lp_set_cmdline(lp_ctx, "torture:binding", host);
+ lpcfg_set_cmdline(lp_ctx, "torture:host", host);
+ lpcfg_set_cmdline(lp_ctx, "torture:share", share);
+ lpcfg_set_cmdline(lp_ctx, "torture:binding", host);
}
return true;
@@ -156,33 +156,33 @@ static void parse_dns(struct loadparm_context *lp_ctx, const char *dns)
/* retrievieng the userdn */
p = strchr_m(dns, '#');
if (!p) {
- lp_set_cmdline(lp_ctx, "torture:ldap_userdn", "");
- lp_set_cmdline(lp_ctx, "torture:ldap_basedn", "");
- lp_set_cmdline(lp_ctx, "torture:ldap_secret", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_userdn", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_basedn", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_secret", "");
return;
}
userdn = strndup(dns, p - dns);
- lp_set_cmdline(lp_ctx, "torture:ldap_userdn", userdn);
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_userdn", userdn);
/* retrieve the basedn */
d = p + 1;
p = strchr_m(d, '#');
if (!p) {
- lp_set_cmdline(lp_ctx, "torture:ldap_basedn", "");
- lp_set_cmdline(lp_ctx, "torture:ldap_secret", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_basedn", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_secret", "");
return;
}
basedn = strndup(d, p - d);
- lp_set_cmdline(lp_ctx, "torture:ldap_basedn", basedn);
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_basedn", basedn);
/* retrieve the secret */
p = p + 1;
if (!p) {
- lp_set_cmdline(lp_ctx, "torture:ldap_secret", "");
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_secret", "");
return;
}
secret = strdup(p);
- lp_set_cmdline(lp_ctx, "torture:ldap_secret", secret);
+ lpcfg_set_cmdline(lp_ctx, "torture:ldap_secret", secret);
printf ("%s - %s - %s\n", userdn, basedn, secret);
@@ -465,35 +465,35 @@ int main(int argc,char *argv[])
while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_LOADFILE:
- lp_set_cmdline(cmdline_lp_ctx, "torture:loadfile", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:loadfile", poptGetOptArg(pc));
break;
case OPT_UNCLIST:
- lp_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:unclist", poptGetOptArg(pc));
break;
case OPT_TIMELIMIT:
- lp_set_cmdline(cmdline_lp_ctx, "torture:timelimit", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:timelimit", poptGetOptArg(pc));
break;
case OPT_NUMPROGS:
- lp_set_cmdline(cmdline_lp_ctx, "torture:nprocs", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:nprocs", poptGetOptArg(pc));
break;
case OPT_DNS:
parse_dns(cmdline_lp_ctx, poptGetOptArg(pc));
break;
case OPT_DANGEROUS:
- lp_set_cmdline(cmdline_lp_ctx, "torture:dangerous", "Yes");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:dangerous", "Yes");
break;
case OPT_ASYNC:
- lp_set_cmdline(cmdline_lp_ctx, "torture:async", "Yes");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:async", "Yes");
break;
case OPT_SMB_PORTS:
- lp_set_cmdline(cmdline_lp_ctx, "smb ports", poptGetOptArg(pc));
+ lpcfg_set_cmdline(cmdline_lp_ctx, "smb ports", poptGetOptArg(pc));
break;
case OPT_EXTRA_USER:
{
char *option = talloc_asprintf(NULL, "torture:extra_user%u",
++num_extra_users);
const char *value = poptGetOptArg(pc);
- lp_set_cmdline(cmdline_lp_ctx, option, value);
+ lpcfg_set_cmdline(cmdline_lp_ctx, option, value);
talloc_free(option);
}
break;
@@ -515,51 +515,51 @@ int main(int argc,char *argv[])
}
if (strcmp(target, "samba3") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:samba3", "true");
- lp_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:samba3", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
} else if (strcmp(target, "samba4") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:samba4", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:samba4", "true");
} else if (strcmp(target, "winxp") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:winxp", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:winxp", "true");
} else if (strcmp(target, "w2k3") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:w2k3", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:w2k3", "true");
} else if (strcmp(target, "w2k8") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:w2k8", "true");
- lp_set_cmdline(cmdline_lp_ctx,
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:w2k8", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx,
"torture:invalid_lock_range_support", "false");
} else if (strcmp(target, "win7") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:win7", "true");
- lp_set_cmdline(cmdline_lp_ctx, "torture:cn_max_buffer_size",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:win7", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:cn_max_buffer_size",
"0x00010000");
- lp_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:rewind_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:rewind_support", "false");
/* RAW-SEARCH for fails for inexplicable reasons against win7 */
- lp_set_cmdline(cmdline_lp_ctx, "torture:search_ea_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:search_ea_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:hide_on_access_denied",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:hide_on_access_denied",
"true");
} else if (strcmp(target, "onefs") == 0) {
- lp_set_cmdline(cmdline_lp_ctx, "torture:onefs", "true");
- lp_set_cmdline(cmdline_lp_ctx, "torture:openx_deny_dos_support",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:onefs", "true");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:openx_deny_dos_support",
"false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:range_not_locked_on_file_close", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:sacl_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:ea_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:smbexit_pdu_support",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:range_not_locked_on_file_close", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:sacl_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:ea_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:smbexit_pdu_support",
"false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:smblock_pdu_support",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:smblock_pdu_support",
"false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:2_step_break_to_none",
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:2_step_break_to_none",
"true");
- lp_set_cmdline(cmdline_lp_ctx, "torture:deny_dos_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:deny_fcb_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:read_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:writeclose_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:rewind_support", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:raw_search_search", "false");
- lp_set_cmdline(cmdline_lp_ctx, "torture:search_ea_size", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:deny_dos_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:deny_fcb_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:read_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:writeclose_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:resume_key_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:rewind_support", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:raw_search_search", "false");
+ lpcfg_set_cmdline(cmdline_lp_ctx, "torture:search_ea_size", "false");
}
if (max_runtime) {
diff --git a/source4/torture/unix/unix_info2.c b/source4/torture/unix/unix_info2.c
index 32cc9ac487..4322d851e4 100644
--- a/source4/torture/unix/unix_info2.c
+++ b/source4/torture/unix/unix_info2.c
@@ -53,16 +53,16 @@ static struct smbcli_state *connect_to_server(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, host,
- lp_smb_ports(tctx->lp_ctx),
- share, NULL, lp_socket_options(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx),
+ share, NULL, lpcfg_socket_options(tctx->lp_ctx),
cmdline_credentials,
- lp_resolve_context(tctx->lp_ctx),
+ 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));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",
diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c
index f87f13f248..45b2775646 100644
--- a/source4/torture/unix/whoami.c
+++ b/source4/torture/unix/whoami.c
@@ -77,15 +77,15 @@ static struct smbcli_state *connect_to_server(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, host,
- lp_smb_ports(tctx->lp_ctx),
- share, NULL, lp_socket_options(tctx->lp_ctx),
- creds, lp_resolve_context(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx),
+ share, NULL, lpcfg_socket_options(tctx->lp_ctx),
+ 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));
if (!NT_STATUS_IS_OK(status)) {
printf("failed to connect to //%s/%s: %s\n",
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 708055096b..8d5accd2dc 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -502,20 +502,20 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
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);
options.use_oplocks = torture_setting_bool(tctx, "use_oplocks", true);
options.use_level2_oplocks = torture_setting_bool(tctx, "use_level2_oplocks", true);
status = smbcli_full_connection(mem_ctx, c, hostname,
- lp_smb_ports(tctx->lp_ctx),
+ lpcfg_smb_ports(tctx->lp_ctx),
sharename, 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),
ev, &options, &session_options,
- lp_gensec_settings(tctx, tctx->lp_ctx));
+ lpcfg_gensec_settings(tctx, tctx->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open connection - %s\n", nt_errstr(status));
return false;
@@ -687,7 +687,7 @@ double torture_create_procs(struct torture_context *tctx,
printf("asprintf failed\n");
return -1;
}
- lp_set_cmdline(tctx->lp_ctx, "netbios name", myname);
+ lpcfg_set_cmdline(tctx->lp_ctx, "netbios name", myname);
free(myname);
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 99b0828319..1603280e48 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -123,7 +123,7 @@ static bool torture_winbind_struct_info(struct torture_context *torture)
separator = torture_setting_string(torture,
"winbindd_separator",
- lp_winbind_separator(torture->lp_ctx));
+ lpcfg_winbind_separator(torture->lp_ctx));
torture_assert_int_equal(torture,
rep.data.info.winbind_separator,
@@ -168,7 +168,7 @@ static bool torture_winbind_struct_netbios_name(struct torture_context *torture)
expected = torture_setting_string(torture,
"winbindd_netbios_name",
- lp_netbios_name(torture->lp_ctx));
+ lpcfg_netbios_name(torture->lp_ctx));
expected = strupper_talloc(torture, expected);
torture_assert_str_equal(torture,
@@ -201,7 +201,7 @@ static bool torture_winbind_struct_domain_name(struct torture_context *torture)
expected = torture_setting_string(torture,
"winbindd_netbios_domain",
- lp_workgroup(torture->lp_ctx));
+ lpcfg_workgroup(torture->lp_ctx));
get_winbind_domain(torture, &domain);
@@ -476,7 +476,7 @@ static bool torture_winbind_struct_getdcname(struct torture_context *torture)
bool strict = torture_setting_bool(torture, "strict mode", false);
const char *domain_name = torture_setting_string(torture,
"winbindd_netbios_domain",
- lp_workgroup(torture->lp_ctx));
+ lpcfg_workgroup(torture->lp_ctx));
struct torture_trust_domain *listd = NULL;
uint32_t i, count = 0;
@@ -929,7 +929,7 @@ static bool lookup_name_sid_list(struct torture_context *torture, char **list)
char *name;
const char *domain_name = torture_setting_string(torture,
"winbindd_netbios_domain",
- lp_workgroup(torture->lp_ctx));
+ lpcfg_workgroup(torture->lp_ctx));
ZERO_STRUCT(req);
ZERO_STRUCT(rep);