Hi,

this patch fixes <https://fedorahosted.org/freeipa/ticket/3563>.

Honza

--
Jan Cholasta
>From 28b598053e74f53681f30a5e9f964bf61a48ba90 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Wed, 17 Apr 2013 15:14:01 +0200
Subject: [PATCH] Use correct zone when removing DNS records of a master.

https://fedorahosted.org/freeipa/ticket/3563
---
 ipaserver/install/bindinstance.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 48bc016..d2e11ad 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -828,13 +828,12 @@ class BindInstance(service.Service):
             self.add_ipa_ca_dns_records(fqdn, domain_name, None)
 
     def remove_master_dns_records(self, fqdn, realm_name, domain_name):
-        host = fqdn.split(".")[0]
+        host, zone = fqdn.split(".", 1)
         self.host = host
         self.fqdn = fqdn
         self.domain = domain_name
         suffix = ipautil.realm_to_suffix(realm_name)
 
-        zone = domain_name
         resource_records = (
             ("_ldap._tcp", "SRV", "0 100 389 %s" % self.host_in_rr),
             ("_kerberos._tcp", "SRV", "0 100 88 %s" % self.host_in_rr),
@@ -848,7 +847,7 @@ class BindInstance(service.Service):
         )
 
         for (record, type, rdata) in resource_records:
-            del_rr(zone, record, type, rdata)
+            del_rr(self.domain, record, type, rdata)
 
         areclist = get_fwd_rr(zone, host)
         for rdata in areclist:
-- 
1.8.1.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to