fix permission_find fail on low search size limit

permission_find() method would have failed if size_limit in config is too
small caused by a search in post_callback. This search should also
respect the passed sizelimit or the sizelimit from ipa config if no
sizelimit is passed.

https://fedorahosted.org/freeipa/ticket/5640

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Stanislav Laznicka 2016-08-11 14:09:22 +02:00 committed by Jan Cholasta
parent 0df65b6d03
commit 29aa4877ee

View File

@ -1307,10 +1307,10 @@ class permission_find(baseldap.LDAPSearch):
if options.get('all'):
attrs_list.append('*')
try:
legacy_entries = ldap.get_entries(
legacy_entries, truncated = ldap.find_entries(
base_dn=DN(self.obj.container_dn, self.api.env.basedn),
filter=ldap.combine_filters(filters, rules=ldap.MATCH_ALL),
attrs_list=attrs_list)
attrs_list=attrs_list, size_limit=max_entries)
# Retrieve the root entry (with all legacy ACIs) at once
root_entry = ldap.get_entry(DN(api.env.basedn), ['aci'])
except errors.NotFound: