[Freeipa-devel] [PATCH] 169 Fix LDAP object parameter encoding

Martin Kosek mkosek at redhat.com
Mon Nov 14 16:24:15 UTC 2011


Tests are now OK, there were a lot of errors related to permissions and
hosts (--random was always on).

I was also thinking if the encoding step shouldn't be done as late as
possible, i.e. after plugin's pre_callbacks, right before LDAP is
called. Now, we do encoding right in the beginning of command processing
and therefore plugin pre_callback already see the encoded values.

If we choose the late-encoding change, we would have to add the encoding
step before every LDAP call in baseldap.py or even before custom LDAP
calls in user plugins when execute() is overloaded - or write a wrapper
for the LDAP calls. That's why I rather chose the proposed solution.


------------
Parameters in LDAP objects missed an information if they are real
LDAP attributes or not. Real LDAP attributes are written to
entry_attrs dictionary in plugin callbacks and are being encoded.
This causes issues when plugin callbacks does not expect that
the parameters values are already encoded for submission to LDAP.

This patch introduces a new flag "noattribute" used to mark that
a parameter is not an LDAP attribute and thus should not be encoded
or added to entry_attrs.

https://fedorahosted.org/freeipa/ticket/2097

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-169-fix-ldap-object-parameter-encoding.patch
Type: text/x-patch
Size: 46640 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111114/635d467b/attachment.bin>


More information about the Freeipa-devel mailing list