diff options
author | Martin Basti <mbasti@redhat.com> | 2014-03-27 14:43:32 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-06-03 15:55:32 +0200 |
commit | d0ce6472f7da037f8163d2aacb703d46e6d4790a (patch) | |
tree | e106ad099868a47246d9d7d4517dffa3d937522f /ipapython | |
parent | b9969c6afe4f98e8dd291a012807ab377f0a881a (diff) | |
download | freeipa-d0ce6472f7da037f8163d2aacb703d46e6d4790a.tar.gz freeipa-d0ce6472f7da037f8163d2aacb703d46e6d4790a.tar.xz freeipa-d0ce6472f7da037f8163d2aacb703d46e6d4790a.zip |
DNSName conversion in ipaldap
Domain name has to be stored in LDAP in punycoded value
Part of ticket:
IPA should allow internationalized domain names
https://fedorahosted.org/freeipa/ticket/3169
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r-- | ipapython/ipaldap.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index 12450e8f2..677e4f807 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -42,6 +42,7 @@ from ipapython.ipautil import ( format_netloc, wait_for_open_socket, wait_for_open_ports, CIDict) from ipapython.ipa_log_manager import log_mgr from ipapython.dn import DN, RDN +from ipapython.dnsutil import DNSName # Global variable to define SASL auth SASL_GSSAPI = ldap.sasl.sasl({}, 'GSSAPI') @@ -258,6 +259,10 @@ class IPASimpleLDAPObject(object): 'managedtemplate': DN, 'managedbase': DN, 'originscope': DN, + 'idnsname': DNSName, + 'idnssoamname': DNSName, + 'idnssoarname': DNSName, + 'dnszoneidnsname': DNSName, }) _SINGLE_VALUE_OVERRIDE = CIDict({ 'nsslapd-ssl-check-hostname': True, @@ -402,6 +407,8 @@ class IPASimpleLDAPObject(object): return 'FALSE' elif isinstance(val, (unicode, float, int, long, Decimal, DN)): return value_to_utf8(val) + elif isinstance(val, DNSName): + return str(val) elif isinstance(val, str): return val elif isinstance(val, list): |