diff options
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/samba_spnupdate | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate index 69406a8196..977de68bc2 100755 --- a/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate @@ -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 |