|
Lines 188-196
Link Here
|
| 188 |
lc1 = LDAPControl('1.2.840.113556.1.4.417',criticality=1) |
188 |
lc1 = LDAPControl('1.2.840.113556.1.4.417',criticality=1) |
| 189 |
page_size = 1000 |
189 |
page_size = 1000 |
| 190 |
|
190 |
|
| 191 |
lc2 = SimplePagedResultsControl( |
191 |
lc2 = SimplePagedResultsControl(True, page_size, '') |
| 192 |
ldap.LDAP_CONTROL_PAGE_OID,True,(page_size,'') |
|
|
| 193 |
) |
| 194 |
|
192 |
|
| 195 |
filter = "" |
193 |
filter = "" |
| 196 |
|
194 |
|
|
Lines 212-223
Link Here
|
| 212 |
pctrls = [ |
210 |
pctrls = [ |
| 213 |
c |
211 |
c |
| 214 |
for c in serverctrls |
212 |
for c in serverctrls |
| 215 |
if c.controlType == ldap.LDAP_CONTROL_PAGE_OID |
213 |
if c.controlType == SimplePagedResultsControl.controlType |
| 216 |
] |
214 |
] |
| 217 |
if pctrls: |
215 |
if pctrls: |
| 218 |
est, cookie = pctrls[0].controlValue |
216 |
cookie = pctrls[0].cookie |
| 219 |
if cookie: |
217 |
if cookie: |
| 220 |
lc2.controlValue = (page_size, cookie) |
218 |
lc2.controlValue = (page_size, cookie) |
|
|
219 |
lc2.cookie = cookie |
| 221 |
if filter_attributes: |
220 |
if filter_attributes: |
| 222 |
msgid = lo.search_ext(configRegistry['%s/ad/ldap/base' % CONFIGBASENAME], ldap.SCOPE_SUBTREE, filter.encode('utf8'), filter_attributes, serverctrls=[lc1,lc2]) |
221 |
msgid = lo.search_ext(configRegistry['%s/ad/ldap/base' % CONFIGBASENAME], ldap.SCOPE_SUBTREE, filter.encode('utf8'), filter_attributes, serverctrls=[lc1,lc2]) |
| 223 |
else: |
222 |
else: |