summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/wins')
-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
5 files changed, 28 insertions, 28 deletions
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;