diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-09-27 07:45:32 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-09-27 16:01:22 +0200 |
commit | c16c257145e44599df5b833954fc84f946546ea1 (patch) | |
tree | 026aa624108810a6426f8d8686c86073ca9ac734 /ipaserver/install | |
parent | ebfda866dd3a67ca46afc3f8771670d7e496de5f (diff) | |
download | freeipa-c16c257145e44599df5b833954fc84f946546ea1.tar.gz freeipa-c16c257145e44599df5b833954fc84f946546ea1.tar.xz freeipa-c16c257145e44599df5b833954fc84f946546ea1.zip |
Fix NS records in installation
Our installation added two final dots to the NS records,
so the records were invalid, Bind ignored the entire zone,
and name resolution didn't work.
Fix this error and add a check for empty DNS labels to the validator
Diffstat (limited to 'ipaserver/install')
-rw-r--r-- | ipaserver/install/bindinstance.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 9f6dca525..f43a9ff0f 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -326,7 +326,9 @@ def add_ptr_rr(zone, ip_address, fqdn, dns_backup=None): add_rr(zone, name, "PTR", fqdn+".", dns_backup) def add_ns_rr(zone, hostname, dns_backup=None, force=True): - add_rr(zone, "@", "NS", hostname+'.', dns_backup=dns_backup, + if not hostname.endswith('.'): + hostname += '.' + add_rr(zone, "@", "NS", hostname, dns_backup=dns_backup, force=force) def del_rr(zone, name, type, rdata): |