mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
permission_find: Do not fail for ipasearchrecordslimit=-1
ipasearchrecordslimit can be -1, which means unlimited. The permission_find post_callback failed in this case in legacy permission handling. Do not fail in this case.
This commit is contained in:
parent
bc3f3381c6
commit
1a9beac1be
@ -891,11 +891,12 @@ class permission_find(baseldap.LDAPSearch):
|
|||||||
for entry in legacy_entries:
|
for entry in legacy_entries:
|
||||||
if entry.single_value['cn'] in nonlegacy_names:
|
if entry.single_value['cn'] in nonlegacy_names:
|
||||||
continue
|
continue
|
||||||
if len(entries) > max_entries:
|
if max_entries > 0 and len(entries) > max_entries:
|
||||||
# We've over the limit, pop the last entry and set
|
# We've over the limit, pop the last entry and set
|
||||||
# truncated flag
|
# truncated flag
|
||||||
# (this is easier to do than checking before adding
|
# (this is easier to do than checking before adding
|
||||||
# the entry to results)
|
# the entry to results)
|
||||||
|
# (max_entries <= 0 means unlimited)
|
||||||
entries.pop()
|
entries.pop()
|
||||||
truncated = True
|
truncated = True
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user