summaryrefslogtreecommitdiffstats
path: root/ipaserver/secrets
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-01-27 18:10:37 +0100
committerJan Cholasta <jcholast@redhat.com>2017-02-10 14:03:04 +0100
commitc27a46177c710fb18bf5b02beab4bd82c191a4bc (patch)
tree308264b9cd9545ae4af45770ca3b7cb5eea1893a /ipaserver/secrets
parent2674a217acc2864a5fed98d7ef1e7031eae4f866 (diff)
downloadfreeipa-c27a46177c710fb18bf5b02beab4bd82c191a4bc.tar.gz
freeipa-c27a46177c710fb18bf5b02beab4bd82c191a4bc.tar.xz
freeipa-c27a46177c710fb18bf5b02beab4bd82c191a4bc.zip
py3: custodia: basedn must be unicode
basedn in custodia related modules has type bytes, that causes issues in Py3 when strings were concatenated with bytes ``` malformed RDN string = "cn=custodia,cn=ipa,cn=etc,b'dc=example,dc=com'" ``` https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/secrets')
-rw-r--r--ipaserver/secrets/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/secrets/common.py b/ipaserver/secrets/common.py
index 2b906b649..f3dc32089 100644
--- a/ipaserver/secrets/common.py
+++ b/ipaserver/secrets/common.py
@@ -23,7 +23,7 @@ class iSecLdap(object):
if self._basedn is None:
conn = self.connect()
r = conn.search_s('', ldap.SCOPE_BASE)
- self._basedn = r[0][1]['defaultnamingcontext'][0]
+ self._basedn = r[0][1]['defaultnamingcontext'][0].decode('utf-8')
return self._basedn
def connect(self):