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

Petr Viktorin pviktori at redhat.com
Thu Nov 20 15:50:03 UTC 2014


On 11/20/2014 03:35 PM, Martin Basti wrote:
> 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 :-) .
>

Pushed to:
master: 35dad9684b22819a2c848e7ebb78cfbc438a30e6
ipa-4-1: 8ab85f161513b376c95094ccfe2b60202fe41baa

-- 
Petr³




More information about the Freeipa-devel mailing list