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:
parent
2a4261c052
commit
4d950527f3
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user