l_ldap_str2dn should return unicode.

The documentation of LDAPberval_to_unicode_object says "use when the
value is known to be text (for instance a distinguishedName)" and
l_ldap_str2dn indeed operates on a distinguishedName.
This commit is contained in:
Aymeric Augustin
2014-04-01 09:47:34 +02:00
committed by Christian Heimes
parent 87eb959787
commit 8a9465f4d1

View File

@@ -78,8 +78,8 @@ l_ldap_str2dn( PyObject* unused, PyObject *args )
PyObject *tuple;
tuple = Py_BuildValue("(O&O&i)",
LDAPberval_to_object, &ava->la_attr,
LDAPberval_to_object, &ava->la_value,
LDAPberval_to_unicode_object, &ava->la_attr,
LDAPberval_to_unicode_object, &ava->la_value,
ava->la_flags & ~(LDAP_AVA_FREE_ATTR|LDAP_AVA_FREE_VALUE));
if (!tuple) {
Py_DECREF(rdnlist);