From cb7e93bb918a81c51b6ffa36919346386f331900 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 10 Jan 2013 12:13:39 +0100 Subject: permission-find no longer crashes with --targetgroup Target Group parameter was not processed correctly which caused permission-find to always crash when this search parameter was used. Fix the crash and create a unit test case to avoid future regression. https://fedorahosted.org/freeipa/ticket/3335 --- ipalib/plugins/aci.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipalib') diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index 702ae0101..24be17458 100644 --- a/ipalib/plugins/aci.py +++ b/ipalib/plugins/aci.py @@ -815,8 +815,9 @@ class aci_find(crud.Search): found = False if 'target' in a.target: target = a.target['target']['expression'] - if api.env.container_group in target: - targetdn = DN(target.replace('ldap:///','')) + targetdn = DN(target.replace('ldap:///','')) + group_container_dn = DN(api.env.container_group, api.env.basedn) + if targetdn.endswith(group_container_dn): try: cn = targetdn[0]['cn'] except (IndexError, KeyError): -- cgit