[Freeipa-devel] [PATCH] Make ldap2.convert_attr_synonyms more robust against schema lookup fails.

Pavel Zuna pzuna at redhat.com
Thu Nov 19 14:38:02 UTC 2009


Rob Crittenden wrote:
> Pavel Zuna wrote:
>> Rob Crittenden wrote:
>>> The user plugin is crapping out on line 317 of ldap2.py because attr 
>>> is coming back None. The attribute it is looking for is member.
>>>
>>> I think the fix involves setting member_attributes = ['member'] to 
>>> the user plugin.
>>>
>>> I wonder if we need to make the ldap2 plugin a bit more robust too so 
>>> it  can handle it better if the schema lookup returns None.
>>>
>>> rob
>> This should fix the issue.
>>
> 
> Yes, this will fix it (I did a similar fix to work around it) but what 
> does it mean if there is no attribute found? Is that possible?
> 
> Should we catch it and return a more specific error message instead?
> 
> rob

If it doesn't find the attribute, PROBABLY nothing will happen...

Fortunately, we don't have to worry about it anymore. I played with python-ldap 
a bit today and it seems to have the convert_attr_synonyms functionality 
built-in. :)

Here's a replacement patch.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-ldap2.convert_attr_synonyms.-Turns-out-python.patch
Type: application/mbox
Size: 2779 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20091119/d7266c24/attachment.mbox>


More information about the Freeipa-devel mailing list