summaryrefslogtreecommitdiffstats
path: root/source4/nbt_server/dgram
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/dgram')
-rw-r--r--source4/nbt_server/dgram/netlogon.c15
-rw-r--r--source4/nbt_server/dgram/ntlogon.c5
-rw-r--r--source4/nbt_server/dgram/request.c10
3 files changed, 18 insertions, 12 deletions
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index eb06abd74ac..ba32bb123e4 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -75,7 +75,7 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
reply.command = NETLOGON_RESPONSE_FROM_PDC;
pdc = &reply.req.response;
- pdc->pdc_name = lp_netbios_name();
+ pdc->pdc_name = lp_netbios_name(global_loadparm);
pdc->unicode_pdc_name = pdc->pdc_name;
pdc->domain_name = samdb_result_string(ref_res[0], "nETBIOSName", name->name);;
pdc->nt_version = 1;
@@ -110,7 +110,7 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
const char *dom_attrs[] = {"objectGUID", NULL};
struct ldb_message **ref_res, **dom_res;
int ret;
- const char **services = lp_server_services();
+ const char **services = lp_server_services(global_loadparm);
const char *my_ip = reply_iface->ip_address;
struct ldb_dn *partitions_basedn;
if (!my_ip) {
@@ -183,15 +183,18 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
}
pdc->domain_uuid = samdb_result_guid(dom_res[0], "objectGUID");
- pdc->forest = samdb_result_string(ref_res[0], "dnsRoot", lp_realm());
- pdc->dns_domain = samdb_result_string(ref_res[0], "dnsRoot", lp_realm());
+ pdc->forest = samdb_result_string(ref_res[0], "dnsRoot",
+ lp_realm(global_loadparm));
+ pdc->dns_domain = samdb_result_string(ref_res[0], "dnsRoot",
+ lp_realm(global_loadparm));
/* TODO: get our full DNS name from somewhere else */
pdc->pdc_dns_name = talloc_asprintf(packet, "%s.%s",
- strlower_talloc(packet, lp_netbios_name()),
+ strlower_talloc(packet,
+ lp_netbios_name(global_loadparm)),
pdc->dns_domain);
pdc->domain = samdb_result_string(ref_res[0], "nETBIOSName", name->name);;
- pdc->pdc_name = lp_netbios_name();
+ pdc->pdc_name = lp_netbios_name(global_loadparm);
pdc->user_name = netlogon->req.pdc2.user_name;
/* TODO: we need to make sure these are in our DNS zone */
pdc->server_site = "Default-First-Site-Name";
diff --git a/source4/nbt_server/dgram/ntlogon.c b/source4/nbt_server/dgram/ntlogon.c
index e24dffb4f4a..9d80a44ce67 100644
--- a/source4/nbt_server/dgram/ntlogon.c
+++ b/source4/nbt_server/dgram/ntlogon.c
@@ -49,9 +49,10 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
reply.command = NTLOGON_SAM_LOGON_REPLY;
logon = &reply.req.reply;
- logon->server = talloc_asprintf(packet, "\\\\%s", lp_netbios_name());
+ logon->server = talloc_asprintf(packet, "\\\\%s",
+ lp_netbios_name(global_loadparm));
logon->user_name = ntlogon->req.logon.user_name;
- logon->domain = lp_workgroup();
+ logon->domain = lp_workgroup(global_loadparm);
logon->nt_version = 1;
logon->lmnt_token = 0xFFFF;
logon->lm20_token = 0xFFFF;
diff --git a/source4/nbt_server/dgram/request.c b/source4/nbt_server/dgram/request.c
index da153403053..48d6e4cb3ab 100644
--- a/source4/nbt_server/dgram/request.c
+++ b/source4/nbt_server/dgram/request.c
@@ -80,7 +80,8 @@ 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->bcast_address,
+ lp_dgram_port(global_loadparm));
if (!bcast_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -90,7 +91,8 @@ 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(), nt_errstr(status)));
+ iface->bcast_address, lp_dgram_port(global_loadparm),
+ nt_errstr(status)));
return status;
}
@@ -105,7 +107,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());
+ bind_address, lp_dgram_port(global_loadparm));
if (!bind_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
@@ -115,7 +117,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(), nt_errstr(status)));
+ bind_address, lp_dgram_port(global_loadparm), nt_errstr(status)));
return status;
}