summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-28 01:17:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:25 -0500
commit37d53832a4623653f706e77985a79d84bd7c6694 (patch)
tree265e308027d6641bbdb29a4feddbe86ef8b25fd1 /source4/cldap_server
parente09226cb35d627affddc08c4a88527184b8ffcf9 (diff)
downloadsamba-37d53832a4623653f706e77985a79d84bd7c6694.tar.gz
samba-37d53832a4623653f706e77985a79d84bd7c6694.tar.bz2
samba-37d53832a4623653f706e77985a79d84bd7c6694.zip
r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/cldap_server.c6
-rw-r--r--source4/cldap_server/netlogon.c20
2 files changed, 14 insertions, 12 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index fbf6f786db..466444ace8 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -95,7 +95,7 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, const char *addr
NT_STATUS_HAVE_NO_MEMORY(cldapsock);
socket_address = socket_address_from_strings(cldapsock, cldapsock->sock->backend_name,
- address, lp_cldap_port());
+ address, lp_cldap_port(global_loadparm));
if (!socket_address) {
talloc_free(cldapsock);
return NT_STATUS_NO_MEMORY;
@@ -104,7 +104,7 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, const char *addr
status = socket_listen(cldapsock->sock, socket_address, 0, 0);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- address, lp_cldap_port(), nt_errstr(status)));
+ address, lp_cldap_port(global_loadparm), nt_errstr(status)));
talloc_free(cldapsock);
return status;
}
@@ -128,7 +128,7 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd)
/* if we are allowing incoming packets from any address, then
we need to bind to the wildcard address */
- if (!lp_bind_interfaces_only()) {
+ if (!lp_bind_interfaces_only(global_loadparm)) {
status = cldapd_add_socket(cldapd, "0.0.0.0");
NT_STATUS_NOT_OK_RETURN(status);
} else {
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 5eef4de4cd..6b398a4144 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -51,7 +51,7 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
const char *dom_attrs[] = {"objectGUID", NULL};
struct ldb_message **ref_res, **dom_res;
int ret, count = 0;
- const char **services = lp_server_services();
+ const char **services = lp_server_services(global_loadparm);
uint32_t server_type;
const char *pdc_name;
struct GUID domain_uuid;
@@ -136,15 +136,17 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
server_type |= NBT_SERVER_KDC;
}
- pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name());
+ pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(global_loadparm));
domain_uuid = samdb_result_guid(dom_res[0], "objectGUID");
- realm = samdb_result_string(ref_res[0], "dnsRoot", lp_realm());
- dns_domain = samdb_result_string(ref_res[0], "dnsRoot", lp_realm());
+ realm = samdb_result_string(ref_res[0], "dnsRoot", lp_realm(global_loadparm));
+ dns_domain = samdb_result_string(ref_res[0], "dnsRoot", lp_realm(global_loadparm));
pdc_dns_name = talloc_asprintf(mem_ctx, "%s.%s",
- strlower_talloc(mem_ctx, lp_netbios_name()),
+ strlower_talloc(mem_ctx,
+ lp_netbios_name(global_loadparm)),
dns_domain);
- flatname = samdb_result_string(ref_res[0], "nETBIOSName", lp_workgroup());
+ flatname = samdb_result_string(ref_res[0], "nETBIOSName",
+ lp_workgroup(global_loadparm));
server_site = "Default-First-Site-Name";
client_site = "Default-First-Site-Name";
pdc_ip = iface_best_ip(src_address);
@@ -188,7 +190,7 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
netlogon->logon5.dns_domain = dns_domain;
netlogon->logon5.pdc_dns_name = pdc_dns_name;
netlogon->logon5.domain = flatname;
- netlogon->logon5.pdc_name = lp_netbios_name();
+ netlogon->logon5.pdc_name = lp_netbios_name(global_loadparm);
netlogon->logon5.user_name = user;
netlogon->logon5.server_site = server_site;
netlogon->logon5.client_site = client_site;
@@ -203,7 +205,7 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
netlogon->logon13.dns_domain = dns_domain;
netlogon->logon13.pdc_dns_name = pdc_dns_name;
netlogon->logon13.domain = flatname;
- netlogon->logon13.pdc_name = lp_netbios_name();
+ netlogon->logon13.pdc_name = lp_netbios_name(global_loadparm);
netlogon->logon13.user_name = user;
netlogon->logon13.server_site = server_site;
netlogon->logon13.client_site = client_site;
@@ -287,7 +289,7 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
}
if (domain_guid == NULL && domain == NULL) {
- domain = lp_realm();
+ domain = lp_realm(global_loadparm);
}
if (version == -1) {