summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-10-16 14:43:39 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-09-01 00:36:41 +0200
commit6ad24d072e360da95e5313a47fb5a312e722593a (patch)
treee6c574f8feaff4c5fc63adf8057f5f98489d7341
parentc11a89a2c1ea54c26533dde34d0c28cc24664a98 (diff)
downloadsamba-6ad24d072e360da95e5313a47fb5a312e722593a.tar.gz
samba-6ad24d072e360da95e5313a47fb5a312e722593a.tar.xz
samba-6ad24d072e360da95e5313a47fb5a312e722593a.zip
provision: Only calculate ForestDNSZone GUID if we need it
Change-Id: Ie33812627ce7ececda681c2d784b1ca97b1b73c4 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
-rw-r--r--python/samba/provision/sambadns.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py
index 87fb486304..66696e83f9 100644
--- a/python/samba/provision/sambadns.py
+++ b/python/samba/provision/sambadns.py
@@ -252,13 +252,8 @@ def setup_dns_partitions(samdb, domainsid, domaindn, forestdn, configdn,
})
domainzone_guid = get_domainguid(samdb, domainzone_dn)
- forestzone_guid = get_domainguid(samdb, forestzone_dn)
-
domainzone_guid = str(uuid.uuid4())
- forestzone_guid = str(uuid.uuid4())
-
domainzone_dns = ldb.Dn(samdb, domainzone_dn).canonical_ex_str().strip()
- forestzone_dns = ldb.Dn(samdb, forestzone_dn).canonical_ex_str().strip()
protected1_desc = get_domain_delete_protected1_descriptor(domainsid)
protected2_desc = get_domain_delete_protected2_descriptor(domainsid)
@@ -278,6 +273,10 @@ def setup_dns_partitions(samdb, domainsid, domaindn, forestdn, configdn,
})
if fill_level != FILL_SUBDOMAIN:
+ forestzone_guid = get_domainguid(samdb, forestzone_dn)
+ forestzone_guid = str(uuid.uuid4())
+ forestzone_dns = ldb.Dn(samdb, forestzone_dn).canonical_ex_str().strip()
+
setup_add_ldif(samdb, setup_path("provision_dnszones_add.ldif"), {
"ZONE_DN": forestzone_dn,
"ZONE_GUID": forestzone_guid,