From 6ad24d072e360da95e5313a47fb5a312e722593a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 16 Oct 2013 14:43:39 +1300 Subject: provision: Only calculate ForestDNSZone GUID if we need it Change-Id: Ie33812627ce7ececda681c2d784b1ca97b1b73c4 Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-By: Jelmer Vernooij --- python/samba/provision/sambadns.py | 9 ++++----- 1 file 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, -- cgit