www.cendio.com
Bug 4816 - tl-ldap-certalias backtrace using python-ldap version 2.4
: tl-ldap-certalias backtrace using python-ldap version 2.4
Status: CLOSED FIXED
: ThinLinc
Smart card
: 4.1.0
: PC Unknown
: P2 Normal
: 4.4.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2013-09-30 11:36 by
Modified: 2015-03-31 12:17 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2013-09-30 11:36:08
Running tl-ldap-certalias on my Fedora 19 gives following traceback:

Traceback (most recent call last):
  File "/opt/thinlinc/sbin/tl-ldap-certalias", line 1323, in <module>
    ret = main()
  File "/opt/thinlinc/sbin/tl-ldap-certalias", line 860, in main
    for user in usersearch:
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 123, in
__iter__
    for II1i1IiiIIi11 in self . results ( ) :
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 135, in
results
    for oo000OO00Oo in self . search_paged ( ) :
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 78, in
search_paged
    oOoO = SimplePagedResultsControl ( ldap . LDAP_CONTROL_PAGE_OID ,
AttributeError: 'module' object has no attribute 'LDAP_CONTROL_PAGE_OID'

The paged result API has changed from python-ldap 2.3 to 2.4.
------- Comment #4 From cendio 2014-10-30 14:41:01 -------
A possible workaround is to change self . pagesize = 1000 from 1000 to 0 in
tl_ldap_iterator.py. This will disable paged querys altogether. Note that when
using this approach, LDAP result size limits may cause the returned data to be
incomplete.
------- Comment #6 From cendio 2014-11-03 12:52:52 -------
Reassigning to --- for discussion.

A note to the future tester: make sure the LDAP query you test with returns
more than self.pagesize results.
------- Comment #7 From cendio 2014-11-10 13:21:28 -------
Fixed in r29576.

Tester should make sure that the code works with LDAP queries with:

 - number of results exceeding pagesize
 - number of results smaller than pagesize
 - python-ldap < 2.4
 - python-ldap >= 2.4
------- Comment #8 From cendio 2015-03-31 09:57:03 -------
>  - number of results exceeding pagesize
>  - number of results smaller than pagesize
>  - python-ldap >= 2.4

Tested using ThinLinc build 4703 against demo LDAP server on a system with
python-ldap 2.4.17.

Query goes through 21192 users nicly and with a special filter resulting with
one entry works perfectly.
------- Comment #9 From cendio 2015-03-31 12:17:21 -------
> 
>  - number of results exceeding pagesize
>  - number of results smaller than pagesize
>  - python-ldap < 2.4

Tested using ThinLinc build 4709 against demo LDAP server on a system with
python-ldap 2.3.10 (RHEL 6).

Using tl-ldap-certalias, the query goes through 21193 users nicely and with a
special filter resulting with one entry works perfectly.

Verified that there was a new demo account between the tests of python-ldap
versions.