summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/dgram/netlogon.c12
-rw-r--r--source4/nbt_server/dgram/ntlogon.c6
-rw-r--r--source4/nbt_server/dgram/request.c8
-rw-r--r--source4/nbt_server/interfaces.c16
-rw-r--r--source4/nbt_server/nbt_server.c2
-rw-r--r--source4/nbt_server/packet.c2
-rw-r--r--source4/nbt_server/query.c2
-rw-r--r--source4/nbt_server/register.c26
-rw-r--r--source4/nbt_server/wins/wins_ldb.c4
-rw-r--r--source4/nbt_server/wins/winsclient.c10
-rw-r--r--source4/nbt_server/wins/winsdb.c10
-rw-r--r--source4/nbt_server/wins/winsserver.c26
-rw-r--r--source4/nbt_server/wins/winswack.c6
13 files changed, 65 insertions, 65 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index c9d864c3c3..8e231ccc23 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -55,13 +55,13 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
samctx = iface->nbtsrv->sam_ctx;
- if (lp_server_role(iface->nbtsrv->task->lp_ctx) != ROLE_DOMAIN_CONTROLLER
+ if (lpcfg_server_role(iface->nbtsrv->task->lp_ctx) != ROLE_DOMAIN_CONTROLLER
|| !samdb_is_pdc(samctx)) {
DEBUG(2, ("Not a PDC, so not processing LOGON_PRIMARY_QUERY\n"));
return;
}
- if (strcasecmp_m(name->name, lp_workgroup(iface->nbtsrv->task->lp_ctx)) != 0) {
+ if (strcasecmp_m(name->name, lpcfg_workgroup(iface->nbtsrv->task->lp_ctx)) != 0) {
DEBUG(5,("GetDC requested for a domian %s that we don't host\n", name->name));
return;
}
@@ -72,16 +72,16 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
pdc = &netlogon_response.data.get_pdc;
pdc->command = NETLOGON_RESPONSE_FROM_PDC;
- pdc->pdc_name = lp_netbios_name(iface->nbtsrv->task->lp_ctx);
+ pdc->pdc_name = lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx);
pdc->unicode_pdc_name = pdc->pdc_name;
- pdc->domain_name = lp_workgroup(iface->nbtsrv->task->lp_ctx);
+ pdc->domain_name = lpcfg_workgroup(iface->nbtsrv->task->lp_ctx);
pdc->nt_version = 1;
pdc->lmnt_token = 0xFFFF;
pdc->lm20_token = 0xFFFF;
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
- lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+ lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
netlogon->req.pdc.mailslot_name,
&netlogon_response);
}
@@ -137,7 +137,7 @@ static void nbtd_netlogon_samlogon(struct dgram_mailslot_handler *dgmslot,
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
- lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+ lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
netlogon->req.logon.mailslot_name,
&netlogon_response);
}
diff --git a/source4/nbt_server/dgram/ntlogon.c b/source4/nbt_server/dgram/ntlogon.c
index 87e76e08ee..978d354abc 100644
--- a/source4/nbt_server/dgram/ntlogon.c
+++ b/source4/nbt_server/dgram/ntlogon.c
@@ -51,9 +51,9 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
logon = &reply.req.reply;
logon->server = talloc_asprintf(packet, "\\\\%s",
- lp_netbios_name(iface->nbtsrv->task->lp_ctx));
+ lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx));
logon->user_name = ntlogon->req.logon.user_name;
- logon->domain = lp_workgroup(iface->nbtsrv->task->lp_ctx);
+ logon->domain = lpcfg_workgroup(iface->nbtsrv->task->lp_ctx);
logon->nt_version = 1;
logon->lmnt_token = 0xFFFF;
logon->lm20_token = 0xFFFF;
@@ -62,7 +62,7 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
dgram_mailslot_ntlogon_reply(reply_iface->dgmsock,
packet,
- lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+ lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
ntlogon->req.logon.mailslot_name,
&reply);
}
diff --git a/source4/nbt_server/dgram/request.c b/source4/nbt_server/dgram/request.c
index 4a3bd13368..0e9a045945 100644
--- a/source4/nbt_server/dgram/request.c
+++ b/source4/nbt_server/dgram/request.c
@@ -83,7 +83,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
bcast_addr = socket_address_from_strings(tmp_ctx, bcast_dgmsock->sock->backend_name,
iface->bcast_address,
- lp_dgram_port(iface->nbtsrv->task->lp_ctx));
+ lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx));
if (!bcast_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -93,7 +93,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- iface->bcast_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx),
+ iface->bcast_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx),
nt_errstr(status)));
return status;
}
@@ -109,7 +109,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
}
bind_addr = socket_address_from_strings(tmp_ctx, iface->dgmsock->sock->backend_name,
- bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx));
+ bind_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx));
if (!bind_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -119,7 +119,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx), nt_errstr(status)));
+ bind_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx), nt_errstr(status)));
return status;
}
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index 19639dd167..bd2143e26c 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -193,7 +193,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
}
bcast_address = socket_address_from_strings(bcast_nbtsock, bcast_nbtsock->sock->backend_name,
- bcast, lp_nbt_port(lp_ctx));
+ bcast, lpcfg_nbt_port(lp_ctx));
if (!bcast_address) {
talloc_free(iface);
return NT_STATUS_NO_MEMORY;
@@ -202,7 +202,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
status = socket_listen(bcast_nbtsock->sock, bcast_address, 0, 0);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- bcast, lp_nbt_port(lp_ctx), nt_errstr(status)));
+ bcast, lpcfg_nbt_port(lp_ctx), nt_errstr(status)));
talloc_free(iface);
return status;
}
@@ -220,12 +220,12 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
unicast_address = socket_address_from_strings(iface->nbtsock,
iface->nbtsock->sock->backend_name,
- bind_address, lp_nbt_port(lp_ctx));
+ bind_address, lpcfg_nbt_port(lp_ctx));
status = socket_listen(iface->nbtsock->sock, unicast_address, 0, 0);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- bind_address, lp_nbt_port(lp_ctx), nt_errstr(status)));
+ bind_address, lpcfg_nbt_port(lp_ctx), nt_errstr(status)));
talloc_free(iface);
return status;
}
@@ -283,7 +283,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
/* if we are allowing incoming packets from any address, then
we also need to bind to the wildcard address */
- if (!lp_bind_interfaces_only(lp_ctx)) {
+ if (!lpcfg_bind_interfaces_only(lp_ctx)) {
const char *primary_address;
/* the primary address is the address we will return
@@ -293,7 +293,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
primary_address = iface_n_ip(ifaces, 0);
} else {
primary_address = inet_ntoa(interpret_addr2(
- lp_netbios_name(lp_ctx)));
+ lpcfg_netbios_name(lp_ctx)));
}
primary_address = talloc_strdup(tmp_ctx, primary_address);
NT_STATUS_HAVE_NO_MEMORY(primary_address);
@@ -318,12 +318,12 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
bcast = talloc_strdup(tmp_ctx, bcast);
netmask = talloc_strdup(tmp_ctx, iface_n_netmask(ifaces, i));
- status = nbtd_add_socket(nbtsrv, lp_ctx,
+ status = nbtd_add_socket(nbtsrv, lp_ctx,
address, address, bcast, netmask);
NT_STATUS_NOT_OK_RETURN(status);
}
- if (lp_wins_server_list(lp_ctx)) {
+ if (lpcfg_wins_server_list(lp_ctx)) {
status = nbtd_add_wins_socket(nbtsrv);
NT_STATUS_NOT_OK_RETURN(status);
}
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index 38abf7135e..2ffa911587 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -39,7 +39,7 @@ static void nbtd_task_init(struct task_server *task)
NTSTATUS status;
struct interface *ifaces;
- load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+ load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
if (iface_count(ifaces) == 0) {
task_server_terminate(task, "nbtd: no network interfaces configured", false);
diff --git a/source4/nbt_server/packet.c b/source4/nbt_server/packet.c
index ff4e94fef9..af96a0130b 100644
--- a/source4/nbt_server/packet.c
+++ b/source4/nbt_server/packet.c
@@ -79,7 +79,7 @@ bool nbtd_self_packet(struct nbt_name_socket *nbtsock,
struct nbtd_server *nbtsrv = iface->nbtsrv;
/* if its not from the nbt port, then it wasn't a broadcast from us */
- if (src->port != lp_nbt_port(iface->nbtsrv->task->lp_ctx)) {
+ if (src->port != lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx)) {
return false;
}
diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c
index be1492f1cd..c888dcaca1 100644
--- a/source4/nbt_server/query.c
+++ b/source4/nbt_server/query.c
@@ -82,7 +82,7 @@ void nbtd_request_query(struct nbt_name_socket *nbtsock,
if (!(packet->operation & NBT_FLAG_BROADCAST) &&
(packet->operation & NBT_FLAG_RECURSION_DESIRED) &&
(iname->nb_flags & NBT_NM_GROUP) &&
- lp_wins_support(iface->nbtsrv->task->lp_ctx)) {
+ lpcfg_wins_support(iface->nbtsrv->task->lp_ctx)) {
nbtd_winsserver_request(nbtsock, packet, src);
return;
}
diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c
index a2840ab5c0..b151fd285d 100644
--- a/source4/nbt_server/register.c
+++ b/source4/nbt_server/register.c
@@ -93,7 +93,7 @@ static void name_refresh_handler(struct tevent_context *ev, struct tevent_timer
registration packets */
io.in.name = iname->name;
io.in.dest_addr = iface->bcast_address;
- io.in.dest_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+ io.in.dest_port = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
io.in.address = iface->ip_address;
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
@@ -118,7 +118,7 @@ static void name_refresh_handler(struct tevent_context *ev, struct tevent_timer
static void nbtd_start_refresh_timer(struct nbtd_iface_name *iname)
{
uint32_t refresh_time;
- uint32_t max_refresh_time = lp_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
+ uint32_t max_refresh_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
refresh_time = MIN(max_refresh_time, iname->ttl/2);
@@ -171,7 +171,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
uint16_t nb_flags)
{
struct nbtd_iface_name *iname;
- const char *scope = lp_netbios_scope(iface->nbtsrv->task->lp_ctx);
+ const char *scope = lpcfg_netbios_scope(iface->nbtsrv->task->lp_ctx);
struct nbt_name_register_bcast io;
struct composite_context *creq;
struct nbtd_server *nbtsrv = iface->nbtsrv;
@@ -188,7 +188,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
iname->name.scope = NULL;
}
iname->nb_flags = nb_flags;
- iname->ttl = lp_parm_int(iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "bcast_ttl", 300000);
+ iname->ttl = lpcfg_parm_int(iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "bcast_ttl", 300000);
iname->registration_time = timeval_zero();
iname->wins_server = NULL;
@@ -211,7 +211,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
/* setup a broadcast name registration request */
io.in.name = iname->name;
io.in.dest_addr = iface->bcast_address;
- io.in.dest_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+ io.in.dest_port = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
io.in.address = iface->ip_address;
io.in.nb_flags = nb_flags;
io.in.ttl = iname->ttl;
@@ -262,29 +262,29 @@ void nbtd_register_names(struct nbtd_server *nbtsrv)
/* note that we don't initially mark the names "ACTIVE". They are
marked active once registration is successful */
- nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
- nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_USER, nb_flags);
- nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_SERVER, nb_flags);
+ nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
+ nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_USER, nb_flags);
+ nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_SERVER, nb_flags);
- aliases = lp_netbios_aliases(nbtsrv->task->lp_ctx);
+ aliases = lpcfg_netbios_aliases(nbtsrv->task->lp_ctx);
while (aliases && aliases[0]) {
nbtd_register_name(nbtsrv, aliases[0], NBT_NAME_CLIENT, nb_flags);
nbtd_register_name(nbtsrv, aliases[0], NBT_NAME_SERVER, nb_flags);
aliases++;
}
- if (lp_server_role(nbtsrv->task->lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
+ if (lpcfg_server_role(nbtsrv->task->lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
bool is_pdc = samdb_is_pdc(nbtsrv->sam_ctx);
if (is_pdc) {
- nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx),
+ nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx),
NBT_NAME_PDC, nb_flags);
}
- nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx),
+ nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx),
NBT_NAME_LOGON, nb_flags | NBT_NM_GROUP);
}
nb_flags |= NBT_NM_GROUP;
- nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
+ nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
nb_flags |= NBT_NM_PERMANENT;
nbtd_register_name(nbtsrv, "__SAMBA__", NBT_NAME_CLIENT, nb_flags);
diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c
index 93382d7ddc..fd609b2780 100644
--- a/source4/nbt_server/wins/wins_ldb.c
+++ b/source4/nbt_server/wins/wins_ldb.c
@@ -89,10 +89,10 @@ static int wins_ldb_init(struct ldb_module *module)
ldb_module_set_private(module, NULL);
- owner = lp_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
+ owner = lpcfg_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
if (!owner) {
struct interface *ifaces;
- load_interfaces(module, lp_interfaces(lp_ctx), &ifaces);
+ load_interfaces(module, lpcfg_interfaces(lp_ctx), &ifaces);
owner = iface_n_ip(ifaces, 0);
if (!owner) {
owner = "0.0.0.0";
diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c
index 94c354a22a..bbd943aca1 100644
--- a/source4/nbt_server/wins/winsclient.c
+++ b/source4/nbt_server/wins/winsclient.c
@@ -58,7 +58,7 @@ static void nbtd_wins_register_retry(struct tevent_context *ev, struct tevent_ti
static void nbtd_wins_start_refresh_timer(struct nbtd_iface_name *iname)
{
uint32_t refresh_time;
- uint32_t max_refresh_time = lp_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
+ uint32_t max_refresh_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
refresh_time = MIN(max_refresh_time, iname->ttl/2);
@@ -141,7 +141,7 @@ static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te
/* setup a wins name refresh request */
io.in.name = iname->name;
io.in.wins_servers = (const char **)str_list_make_single(tmp_ctx, iname->wins_server);
- io.in.wins_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+ io.in.wins_port = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
io.in.addresses = nbtd_address_list(iface, tmp_ctx);
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
@@ -180,7 +180,7 @@ static void nbtd_wins_register_handler(struct composite_context *c)
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
/* none of the WINS servers responded - try again
periodically */
- int wins_retry_time = lp_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "wins_retry", 300);
+ int wins_retry_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "wins_retry", 300);
event_add_timed(iname->iface->nbtsrv->task->event_ctx,
iname,
timeval_current_ofs(wins_retry_time, 0),
@@ -237,8 +237,8 @@ void nbtd_winsclient_register(struct nbtd_iface_name *iname)
/* setup a wins name register request */
io.in.name = iname->name;
- io.in.wins_port = lp_nbt_port(iname->iface->nbtsrv->task->lp_ctx);
- io.in.wins_servers = lp_wins_server_list(iname->iface->nbtsrv->task->lp_ctx);
+ io.in.wins_port = lpcfg_nbt_port(iname->iface->nbtsrv->task->lp_ctx);
+ io.in.wins_servers = lpcfg_wins_server_list(iname->iface->nbtsrv->task->lp_ctx);
io.in.addresses = nbtd_address_list(iface, iname);
io.in.nb_flags = iname->nb_flags;
io.in.ttl = iname->ttl;
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index fef5cc84d5..a0fe87dc68 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -971,11 +971,11 @@ static bool winsdb_check_or_add_module_list(struct tevent_context *ev_ctx,
talloc_free(h->ldb);
h->ldb = NULL;
- if (lp_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
+ if (lpcfg_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
flags |= LDB_FLG_NOSYNC;
}
- h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)),
+ h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lpcfg_wins_url(lp_ctx)),
NULL, NULL, flags);
if (!h->ldb) goto failed;
@@ -1007,16 +1007,16 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx,
h = talloc_zero(mem_ctx, struct winsdb_handle);
if (!h) return NULL;
- if (lp_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
+ if (lpcfg_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
flags |= LDB_FLG_NOSYNC;
}
- h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)),
+ h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lpcfg_wins_url(lp_ctx)),
NULL, NULL, flags);
if (!h->ldb) goto failed;
h->caller = caller;
- h->hook_script = lp_wins_hook(lp_ctx);
+ h->hook_script = lpcfg_wins_hook(lp_ctx);
h->local_owner = talloc_strdup(h, owner);
if (!h->local_owner) goto failed;
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index ff4c5fdbb9..516258e892 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -415,7 +415,7 @@ static void wins_register_wack(struct nbt_name_socket *nbtsock,
if (talloc_reference(s, src) == NULL) goto failed;
s->io.in.nbtd_server = iface->nbtsrv;
- s->io.in.nbt_port = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+ s->io.in.nbt_port = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
s->io.in.event_ctx = iface->nbtsrv->task->event_ctx;
s->io.in.name = rec->name;
s->io.in.num_addresses = winsdb_addr_list_length(rec->addresses);
@@ -672,7 +672,7 @@ static void nbtd_wins_randomize1Clist(struct loadparm_context *lp_ctx,
/* first sort the addresses depending on the matching to the client */
LDB_TYPESAFE_QSORT(addresses, num_addrs, src, nbtd_wins_randomize1Clist_sort);
- mask = lp_parm_string(lp_ctx, NULL, "nbtd", "wins_randomize1Clist_mask");
+ mask = lpcfg_parm_string(lp_ctx, NULL, "nbtd", "wins_randomize1Clist_mask");
if (!mask) {
mask = "255.255.255.0";
}
@@ -750,7 +750,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
* Value: 0 = deactivated, 1 = activated
*/
if (name->type == NBT_NAME_LOGON &&
- lp_parm_bool(lp_ctx, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
+ lpcfg_parm_bool(lp_ctx, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
struct nbt_name name_1b;
name_1b = *name;
@@ -764,7 +764,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
status = winsdb_lookup(winssrv->wins_db, name, packet, &rec);
if (!NT_STATUS_IS_OK(status)) {
- if (!lp_wins_dns_proxy(lp_ctx)) {
+ if (!lpcfg_wins_dns_proxy(lp_ctx)) {
goto notfound;
}
@@ -846,7 +846,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
* Value: 0 = deactivated, 1 = activated
*/
if (name->type == NBT_NAME_LOGON &&
- lp_parm_bool(lp_ctx, NULL, "nbtd", "wins_randomize1Clist", false)) {
+ lpcfg_parm_bool(lp_ctx, NULL, "nbtd", "wins_randomize1Clist", false)) {
nbtd_wins_randomize1Clist(lp_ctx, addresses, src);
}
@@ -959,7 +959,7 @@ static void nbtd_winsserver_release(struct nbt_name_socket *nbtsock,
if (strcmp(rec->wins_owner, winssrv->wins_db->local_owner) != 0) {
modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
}
- if (lp_parm_bool(iface->nbtsrv->task->lp_ctx, NULL, "wreplsrv", "propagate name releases", false)) {
+ if (lpcfg_parm_bool(iface->nbtsrv->task->lp_ctx, NULL, "wreplsrv", "propagate name releases", false)) {
/*
* We have an option to propagate every name release,
* this is off by default to match windows servers
@@ -1038,7 +1038,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
uint32_t tmp;
const char *owner;
- if (!lp_wins_support(nbtsrv->task->lp_ctx)) {
+ if (!lpcfg_wins_support(nbtsrv->task->lp_ctx)) {
nbtsrv->winssrv = NULL;
return NT_STATUS_OK;
}
@@ -1046,18 +1046,18 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
nbtsrv->winssrv = talloc_zero(nbtsrv, struct wins_server);
NT_STATUS_HAVE_NO_MEMORY(nbtsrv->winssrv);
- nbtsrv->winssrv->config.max_renew_interval = lp_max_wins_ttl(nbtsrv->task->lp_ctx);
- nbtsrv->winssrv->config.min_renew_interval = lp_min_wins_ttl(nbtsrv->task->lp_ctx);
- tmp = lp_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
+ nbtsrv->winssrv->config.max_renew_interval = lpcfg_max_wins_ttl(nbtsrv->task->lp_ctx);
+ nbtsrv->winssrv->config.min_renew_interval = lpcfg_min_wins_ttl(nbtsrv->task->lp_ctx);
+ tmp = lpcfg_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
nbtsrv->winssrv->config.tombstone_interval = tmp;
- tmp = lp_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
+ tmp = lpcfg_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
nbtsrv->winssrv->config.tombstone_timeout = tmp;
- owner = lp_parm_string(nbtsrv->task->lp_ctx, NULL, "winsdb", "local_owner");
+ owner = lpcfg_parm_string(nbtsrv->task->lp_ctx, NULL, "winsdb", "local_owner");
if (owner == NULL) {
struct interface *ifaces;
- load_interfaces(nbtsrv->task, lp_interfaces(nbtsrv->task->lp_ctx), &ifaces);
+ load_interfaces(nbtsrv->task, lpcfg_interfaces(nbtsrv->task->lp_ctx), &ifaces);
owner = iface_n_ip(ifaces, 0);
}
diff --git a/source4/nbt_server/wins/winswack.c b/source4/nbt_server/wins/winswack.c
index a58362830a..0fd9767b73 100644
--- a/source4/nbt_server/wins/winswack.c
+++ b/source4/nbt_server/wins/winswack.c
@@ -163,7 +163,7 @@ static void wins_release_demand_handler(struct nbt_name_request *req)
if (state->current_address < state->io->in.num_addresses) {
struct nbtd_interface *iface;
- state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
+ state->release.in.dest_port = lpcfg_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.timeout = (state->addresses_left > 1 ? 2 : 1);
@@ -223,7 +223,7 @@ static struct composite_context *wins_release_demand_send(TALLOC_CTX *mem_ctx, s
* with 2 retries
*/
state->release.in.name = *state->io->in.name;
- state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
+ state->release.in.dest_port = lpcfg_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
state->release.in.dest_addr = state->io->in.addresses[state->current_address];
state->release.in.address = state->release.in.dest_addr;
state->release.in.broadcast = false;
@@ -306,7 +306,7 @@ NTSTATUS nbtd_proxy_wins_challenge(struct irpc_message *msg,
s->req = req;
s->io.in.nbtd_server = nbtd_server;
- s->io.in.nbt_port = lp_nbt_port(nbtd_server->task->lp_ctx);
+ s->io.in.nbt_port = lpcfg_nbt_port(nbtd_server->task->lp_ctx);
s->io.in.event_ctx = msg->ev;
s->io.in.name = &req->in.name;
s->io.in.num_addresses = req->in.num_addrs;