diff options
author | Martin Nagy <mnagy@redhat.com> | 2010-04-19 03:39:52 +0200 |
---|---|---|
committer | Martin Nagy <mnagy@redhat.com> | 2010-04-19 14:21:09 +0200 |
commit | d539d21962a2b98951d91f5811c3d69c5ddc8c8a (patch) | |
tree | 8992b37fdc010d29c61fd5acadaaacca5db81af9 /ipalib | |
parent | afaa21052c213ae59b0b0858306ce1df2beb76c8 (diff) | |
download | freeipa-d539d21962a2b98951d91f5811c3d69c5ddc8c8a.tar.gz freeipa-d539d21962a2b98951d91f5811c3d69c5ddc8c8a.tar.xz freeipa-d539d21962a2b98951d91f5811c3d69c5ddc8c8a.zip |
Add forgotten trailing dots in DNS records
583023
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/dns.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 4c81a8e7..bc6c73d8 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -95,6 +95,13 @@ _zone_default_attributes = [ ] +# normalizer for admin email +def _rname_normalizer(value): + value = value.replace('@', '.') + if not value.endswith('.'): + value += '.' + return value + # build zone dn def _get_zone_dn(ldap, idnsname): rdn = ldap.make_rdn_from_attr('idnsname', idnsname) @@ -129,7 +136,7 @@ class dns(Object): cli_name='admin_email', label=_('administrator e-mail address'), default_from=lambda idnsname: 'root.%s' % idnsname, - normalizer=lambda value: value.replace('@', '.'), + normalizer=_rname_normalizer, ), Int('idnssoaserial?', cli_name='serial', |