summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-19 13:02:40 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-19 13:36:02 -0700
commit8beed3679d09e0c89a081ef6b32536cf57419521 (patch)
tree2847663d82bbba496aa6df32201aefed66331042 /source4/scripting/bin
parent6642ae9703e4ccb1fdfefa81a6da5b5fa52b53ad (diff)
downloadsamba-8beed3679d09e0c89a081ef6b32536cf57419521.tar.gz
samba-8beed3679d09e0c89a081ef6b32536cf57419521.tar.bz2
samba-8beed3679d09e0c89a081ef6b32536cf57419521.zip
s4-dns: fixed the dns_domain_info_type for netlogon DNS calls
w2k8r2 does check this field (WSPP docs need an update)
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate17
1 files changed, 14 insertions, 3 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 6729328d96..d3abcb1052 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -256,11 +256,22 @@ def rodc_dns_update(d, t):
if opts.verbose:
print "Calling netlogon RODC update for %s" % d
+ typemap = {
+ netlogon.NlDnsLdapAtSite : netlogon.NlDnsInfoTypeNone,
+ netlogon.NlDnsGcAtSite : netlogon.NlDnsDomainNameAlias,
+ netlogon.NlDnsDsaCname : netlogon.NlDnsDomainNameAlias,
+ netlogon.NlDnsKdcAtSite : netlogon.NlDnsInfoTypeNone,
+ netlogon.NlDnsDcAtSite : netlogon.NlDnsInfoTypeNone,
+ netlogon.NlDnsRfc1510KdcAtSite : netlogon.NlDnsInfoTypeNone,
+ netlogon.NlDnsGenericGcAtSite : netlogon.NlDnsDomainNameAlias
+ }
+
w = winbind.winbind("irpc:winbind_server", lp)
dns_names = netlogon.NL_DNS_NAME_INFO_ARRAY()
dns_names.count = 1
name = netlogon.NL_DNS_NAME_INFO()
name.type = t
+ name.dns_domain_info_type = typemap[t]
name.priority = 0
name.weight = 0
if d.port is not None:
@@ -273,8 +284,8 @@ def rodc_dns_update(d, t):
ret_names = w.DsrUpdateReadOnlyServerDnsRecords(site_name, default_ttl, dns_names)
if ret_names.names[0].status != 0:
print("Failed to set DNS entry: %s (status %u)" % (d, ret_names.names[0].status))
- except:
- print("Error setting DNS entry: %s" % d)
+ except RuntimeError, reason:
+ print("Error setting DNS entry of type %u: %s: %s" % (t, d, reason))
def call_rodc_update(d):
@@ -287,7 +298,7 @@ def call_rodc_update(d):
# map the DNS request to a netlogon update type
map = {
- netlogon.NlDnsLdapAtSite : '_ldap._tcp.${SITE}._sites.${DNSDOMAIN}',
+ netlogon.NlDnsLdapAtSite : '_ldap._tcp.${SITE}._sites.${DNSDOMAIN}',
netlogon.NlDnsGcAtSite : '_ldap._tcp.${SITE}._sites.gc._msdcs.${DNSDOMAIN}',
netlogon.NlDnsDsaCname : '${NTDSGUID}._msdcs.${DNSFOREST}',
netlogon.NlDnsKdcAtSite : '_kerberos._tcp.${SITE}._sites.dc._msdcs.${DNSDOMAIN}',