1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

traffic: add paged_results control for ldb search

While there are more then 1000 records in the search result from Windows,
a `LDAP_SIZE_LIMIT_EXCEEDED` error will be returned.

Add paged_results control to fix.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Joe Guo 2018-04-18 15:36:02 +12:00 committed by Andrew Bartlett
parent 2a4261c052
commit 4d950527f3
2 changed files with 5 additions and 1 deletions

View File

@ -343,6 +343,7 @@ class ReplayContext(object):
res = db.search(db.domain_dn(),
scope=ldb.SCOPE_SUBTREE,
controls=["paged_results:1:1000"],
attrs=['dn'])
# find a list of dns for each pattern

View File

@ -326,7 +326,10 @@ def packet_ldap_3(packet, conversation, context):
samdb = context.get_ldap_connection()
dn = context.get_matching_dn(dn_sig)
samdb.search(dn, scope=int(scope), attrs=attrs.split(','))
samdb.search(dn,
scope=int(scope),
attrs=attrs.split(','),
controls=["paged_results:1:1000"])
return True