On 01/31/2014 10:22 AM, Martin Kosek wrote:
On 01/28/2014 02:18 PM, Petr Viktorin wrote:
On 01/27/2014 12:32 PM, Martin Kosek wrote:
When users with missing default group were searched, IPA suffix was
not passed so these users were searched in a wrong base DN. Thus,
no user was detected and added to default group.
This needs a rebase for the new LDAP API.
I tested primarily on ipa-3-3 branch, I will rebase when acked.
I don't see the need for the second change, caching of len(new_members). On
lists, len() is extremely fast.
If you want to optimize, convert the list of existing members to a set before
the for loop, instead of getting it from the entry and using the `in` operator
(which is O(N) on lists) every time.
Makes sense, done.
Instead of "if len(container) > 0:" you should just use "if container:" (see
members = group_entry_attrs.get('member', )
group_entry_attrs['member'] = members
you can use:
members = group_entry_attrs.setdefault('member', )
New patch attached (tested).
Works fine, ACK. You can rebase to master now.
Freeipa-devel mailing list