mirror of
https://github.com/samba-team/samba.git
synced 2025-10-24 15:33:20 +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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user