1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s4: samba_spnupdate: fix "if we are DNS server" check

We need to check if we have hasMasterNCs. If we are RODC we have
hasFullReplicaNCs instead of hasMasterNCs.

TODO: maybe check for hasFullReplicaNCs, too?

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Björn Baumbach 2012-08-01 15:09:00 +02:00 committed by Stefan Metzmacher
parent 8dde55c7fb
commit d6428319d4

View File

@ -130,11 +130,12 @@ res = samdb.search(base=samdb.get_config_basedn(),
basedn = str(samdb.get_default_basedn())
if len(res) == 1:
for e in res[0]["msDS-hasMasterNCs"]:
if str(e) == "DC=DomainDnsZones,%s" % basedn:
has_domain_dns = True
if str(e) == "DC=ForestDnsZones,%s" % basedn:
has_forest_dns = True
if "msDS-hasMasterNCs" in res[0]:
for e in res[0]["msDS-hasMasterNCs"]:
if str(e) == "DC=DomainDnsZones,%s" % basedn:
has_domain_dns = True
if str(e) == "DC=ForestDnsZones,%s" % basedn:
has_forest_dns = True
# build the spn list