summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_dnsupdate
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/bin/samba_dnsupdate')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 30d5608d50a..181e67fdf2f 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -299,6 +299,8 @@ def get_subst_vars(samdb):
vars['IF_RWGC'] = ""
basedn = str(samdb.get_default_basedn())
+ forestdn = str(samdb.get_root_basedn())
+
if "msDS-hasMasterNCs" in res[0]:
for e in res[0]["msDS-hasMasterNCs"]:
if str(e) == "DC=DomainDnsZones,%s" % basedn:
@@ -307,7 +309,7 @@ def get_subst_vars(samdb):
vars['IF_RODNS_DOMAIN'] = ""
else:
vars['IF_RWDNS_DOMAIN'] = ""
- if str(e) == "DC=ForestDnsZones,%s" % basedn:
+ if str(e) == "DC=ForestDnsZones,%s" % forestdn:
vars['IF_DNS_FOREST'] = ""
if am_rodc:
vars['IF_RODNS_FOREST'] = ""