[Freeipa-devel] [PATCH] 0030 Fix --{user, group}-ignore-attribute in migration plugin.

Martin Basti mbasti at redhat.com
Thu Nov 20 14:35:33 UTC 2014


On 20/11/14 15:25, Jan Cholasta wrote:
> Dne 20.11.2014 v 14:51 Martin Basti napsal(a):
>> On 20/11/14 11:53, David Kupka wrote:
>>> On 11/20/2014 10:03 AM, Jan Cholasta wrote:
>>>> Dne 20.11.2014 v 09:51 David Kupka napsal(a):
>>>>> https://fedorahosted.org/freeipa/ticket/4620
>>>>
>>>> IMO changing the loop to:
>>>>
>>>>     for attr in attr_blacklist:
>>>>         entry_attrs.pop(attr, None)
>>>>
>>>> would be better, because LDAPEntry already handles case 
>>>> insensitivity in
>>>> attribute names.
>>>>
>>> This seems better, thanks.
>>>
>>>
>> IMO the same problem is with objectclasses.
>>
>>
>>      # do not migrate all object classes
>>      if 'objectclass' in entry_attrs:
>>          for object_class in kwargs.get('oc_blacklist', []):
>>              try:
>> entry_attrs['objectclass'].remove(object_class)   #
>> this is case sensitive
>>              except ValueError:  # object class not present
>>                  pass
>>
>> Am I right?
>
> Yes. LDAPEntry does not support case insensitivity in this case, 
> although I plan to implement it in 4.2.
>
objectclasses are normalized to lowercase before, so it is not a issue.

The patch works fine, ACK :-) .

-- 
Martin Basti




More information about the Freeipa-devel mailing list