Re: [Freeipa-devel] [PATCH] 0006 Fix group-remove-member crash when group is removed from a protected group
On 07/23/2014 04:32 PM, David Kupka wrote: On 07/23/2014 04:15 PM, Martin Kosek wrote: On 07/23/2014 04:08 PM, David Kupka wrote: https://fedorahosted.org/freeipa/ticket/4448 Alternatively, we could also update the if condition to avoid running this section at all when options['user'] does not exist or is empty. This would save us at least from api.Command.group_show call. Martin You're right as always, Martin :-) Works fine, ACK. Pushed to: master: 6119c21441747a1f2dd49df204effe1f2a3240dc ipa-4-1: 6119c21441747a1f2dd49df204effe1f2a3240dc ipa-4-0: 97565cf8ffa8741dac3629e8989d747faa24ddf0 I will not close the ticket until the test that Petr looks on is finished. Martin ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH] 0006 Fix group-remove-member crash when group is removed from a protected group
https://fedorahosted.org/freeipa/ticket/4448 -- David Kupka From 306fd94ae35f153bd7eabf80217219ec25b2189b Mon Sep 17 00:00:00 2001 From: David Kupka dku...@redhat.com Date: Wed, 23 Jul 2014 16:02:17 +0200 Subject: [PATCH] Fix group-remove-member crash when group is removed from a protected group https://fedorahosted.org/freeipa/ticket/4448 --- ipalib/plugins/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py index af5d4b6bf5217fcda912a92453d15cd0974c1c53..4890bab111c2882ed34cfe28e7384982b9815ac4 100644 --- a/ipalib/plugins/group.py +++ b/ipalib/plugins/group.py @@ -526,7 +526,7 @@ class group_remove_member(LDAPRemoveMember): protected_group_name = keys[0] result = api.Command.group_show(protected_group_name) users_left = set(result['result'].get('member_user', [])) -users_deleted = set(options['user']) +users_deleted = set(options.get('user',[])) if users_left.issubset(users_deleted): raise errors.LastMemberError(key=sorted(users_deleted)[0], label=_(u'group'), container=protected_group_name) -- 1.9.3 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0006 Fix group-remove-member crash when group is removed from a protected group
On 07/23/2014 04:08 PM, David Kupka wrote: https://fedorahosted.org/freeipa/ticket/4448 Alternatively, we could also update the if condition to avoid running this section at all when options['user'] does not exist or is empty. This would save us at least from api.Command.group_show call. Martin ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 0006 Fix group-remove-member crash when group is removed from a protected group
Martin Kosek wrote: On 07/23/2014 04:08 PM, David Kupka wrote: https://fedorahosted.org/freeipa/ticket/4448 Alternatively, we could also update the if condition to avoid running this section at all when options['user'] does not exist or is empty. This would save us at least from api.Command.group_show call. A new test or tests would be nice as well. rob ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel