summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-07 23:06:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:48 -0500
commitfdc2be2cd6b48bfe5f9dbd3306714119f95bcaf2 (patch)
tree8ba26eb9abee42c41e6cb05572fb172c92c07fd8 /source4/cldap_server
parent7c9d76d30c0f89f926744941ba3e0e6dbb24975c (diff)
downloadsamba-fdc2be2cd6b48bfe5f9dbd3306714119f95bcaf2.tar.gz
samba-fdc2be2cd6b48bfe5f9dbd3306714119f95bcaf2.tar.bz2
samba-fdc2be2cd6b48bfe5f9dbd3306714119f95bcaf2.zip
r7378: Lowercase netbios name when forming the DNS name of the DC in the
NETLOGON reply. Use the kdc server service to determine if we are a kdc (no more krb5:kdc=yes). Andrew Bartlett (This used to be commit fe9cdb063ca183674d0093b43017cc054d7c3f63)
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/netlogon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 3ccad45d9f..9e7ddc6989 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -83,19 +83,21 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
NBT_SERVER_CLOSEST | NBT_SERVER_WRITABLE |
NBT_SERVER_GOOD_TIMESERV;
- if (lp_parm_bool(-1, "krb5", "kdc", True)) {
- server_type |= NBT_SERVER_KDC;
- }
if (str_list_check(services, "ldap")) {
server_type |= NBT_SERVER_LDAP;
}
+ if (str_list_check(services, "kdc")) {
+ server_type |= NBT_SERVER_KDC;
+ }
+
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name());
domain_uuid = samdb_result_guid(res[0], "objectGUID");
realm = samdb_result_string(res[0], "realm", lp_realm());
dns_domain = samdb_result_string(res[0], "dnsDomain", lp_realm());
pdc_dns_name = talloc_asprintf(mem_ctx, "%s.%s",
- lp_netbios_name(), dns_domain);
+ strlower_talloc(mem_ctx, lp_netbios_name()),
+ dns_domain);
flatname = samdb_result_string(res[0], "name", lp_workgroup());
site_name = "Default-First-Site-Name";
site_name2 = "";