mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
py3: get_effective_rights: values passed to ldap must be bytes
Values passed to LDAP must be bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
dd3d9f1ca6
commit
49333058c8
@ -289,7 +289,10 @@ class ldap2(CrudBackend, LDAPClient):
|
||||
principal = getattr(context, 'principal')
|
||||
entry = self.find_entry_by_attr("krbprincipalname", principal,
|
||||
"krbPrincipalAux", base_dn=self.api.env.basedn)
|
||||
sctrl = [GetEffectiveRightsControl(True, "dn: " + str(entry.dn))]
|
||||
sctrl = [
|
||||
GetEffectiveRightsControl(
|
||||
True, "dn: {0}".format(entry.dn).encode('utf-8'))
|
||||
]
|
||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, sctrl)
|
||||
try:
|
||||
entry = self.get_entry(dn, attrs_list)
|
||||
|
Loading…
Reference in New Issue
Block a user