mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Enforce sizelimit in permission-find, post_callback returns truncated
We actually perform two searches in permission-find. The first looks for matches within the permission object itself. The second looks at matches in the underlying aci. We need to break out in two places. The first is if we find enough matches in the permission itself. The second when we are appending matches from acis. The post_callback() definition needed to be modified to return the truncated value so a plugin author can modify that value. https://fedorahosted.org/freeipa/ticket/2322
This commit is contained in:
committed by
Martin Kosek
parent
d62b2d9be5
commit
8d00d7c130
@@ -769,7 +769,7 @@ class host_find(LDAPSearch):
|
||||
|
||||
def post_callback(self, ldap, entries, truncated, *args, **options):
|
||||
if options.get('pkey_only', False):
|
||||
return
|
||||
return truncated
|
||||
for entry in entries:
|
||||
(dn, entry_attrs) = entry
|
||||
set_certificate_attrs(entry_attrs)
|
||||
@@ -785,6 +785,8 @@ class host_find(LDAPSearch):
|
||||
|
||||
output_sshpubkey(ldap, dn, entry_attrs)
|
||||
|
||||
return truncated
|
||||
|
||||
api.register(host_find)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user