summaryrefslogtreecommitdiff
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
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)
-rw-r--r--source4/cldap_server/netlogon.c10
-rw-r--r--source4/nbt_server/dgram/netlogon.c10
2 files changed, 12 insertions, 8 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 = "";
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index 326bfb00e5..0ad05f48c9 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -118,20 +118,22 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
NBT_SERVER_GOOD_TIMESERV;
/* hmm, probably a better way to do this */
- if (lp_parm_bool(-1, "krb5", "kdc", True)) {
- pdc->server_type |= NBT_SERVER_KDC;
- }
if (str_list_check(services, "ldap")) {
pdc->server_type |= NBT_SERVER_LDAP;
}
+ if (str_list_check(services, "kdc")) {
+ pdc->server_type |= NBT_SERVER_KDC;
+ }
+
pdc->domain_uuid = samdb_result_guid(res[0], "objectGUID");
pdc->forest = samdb_result_string(res[0], "realm", lp_realm());
pdc->dns_domain = samdb_result_string(res[0], "dnsDomain", lp_realm());
/* TODO: get our full DNS name from somewhere else */
pdc->pdc_dns_name = talloc_asprintf(packet, "%s.%s",
- lp_netbios_name(), pdc->dns_domain);
+ strlower_talloc(packet, lp_netbios_name()),
+ pdc->dns_domain);
pdc->domain = name->name;
pdc->pdc_name = lp_netbios_name();
pdc->user_name = netlogon->req.pdc2.user_name;