summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-12 19:09:18 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-14 10:50:43 +0200
commite9686985cbf1f5234d9e9731176b1eb4e02911e8 (patch)
tree0426dc196c4223079f11c29c465b631e7d0eecdd /source4/cldap_server
parentccfbe7bcb1f09530091ad6c986eae19a378bd2ea (diff)
downloadsamba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.tar.gz
samba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.tar.bz2
samba-e9686985cbf1f5234d9e9731176b1eb4e02911e8.zip
s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch implements the use of both in the right way.
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/netlogon.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 50a8775ae4..b06fd609f2 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -61,7 +61,6 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
uint32_t server_type;
const char *pdc_name;
struct GUID domain_uuid;
- const char *realm;
const char *dns_domain;
const char *pdc_dns_name;
const char *flatname;
@@ -78,7 +77,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
domain = talloc_strndup(mem_ctx, domain, strlen(domain)-1);
}
- if (domain && strcasecmp_m(domain, lp_realm(lp_ctx)) == 0) {
+ if (domain && strcasecmp_m(domain, lp_dnsdomain(lp_ctx)) == 0) {
domain_dn = ldb_get_default_basedn(sam_ctx);
}
@@ -245,8 +244,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(lp_ctx));
domain_uuid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
- realm = lp_realm(lp_ctx);
- dns_domain = lp_realm(lp_ctx);
+ dns_domain = lp_dnsdomain(lp_ctx);
pdc_dns_name = talloc_asprintf(mem_ctx, "%s.%s",
strlower_talloc(mem_ctx,
lp_netbios_name(lp_ctx)),
@@ -274,7 +272,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
}
netlogon->data.nt5_ex.server_type = server_type;
netlogon->data.nt5_ex.domain_uuid = domain_uuid;
- netlogon->data.nt5_ex.forest = realm;
+ netlogon->data.nt5_ex.forest = dns_domain;
netlogon->data.nt5_ex.dns_domain = dns_domain;
netlogon->data.nt5_ex.pdc_dns_name = pdc_dns_name;
netlogon->data.nt5_ex.domain = flatname;
@@ -307,7 +305,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
netlogon->data.nt5.user_name = user;
netlogon->data.nt5.domain_name = flatname;
netlogon->data.nt5.domain_uuid = domain_uuid;
- netlogon->data.nt5.forest = realm;
+ netlogon->data.nt5.forest = dns_domain;
netlogon->data.nt5.dns_domain = dns_domain;
netlogon->data.nt5.pdc_dns_name = pdc_dns_name;
netlogon->data.nt5.pdc_ip = pdc_ip;
@@ -403,7 +401,7 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
}
if (domain_guid == NULL && domain == NULL) {
- domain = lp_realm(cldapd->task->lp_ctx);
+ domain = lp_dnsdomain(cldapd->task->lp_ctx);
}
if (version == -1) {