You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/12/04 04:01:16 UTC

DO NOT REPLY [Bug 44015] New: - Bug in util_ldap.c, mod_ldap

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44015

           Summary: Bug in util_ldap.c, mod_ldap
           Product: Apache httpd-2
           Version: 2.2.6
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: critical
          Priority: P2
         Component: mod_ldap
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: agustin.herranz@alumnos.uva.es


First, sorry about my horrible english.
In util_ldap.c the max of returned entries for a search is defined as:

/* Default define for ldap functions that need a SIZELIMIT but
 * do not have the define
 * XXX This should be removed once a supporting #define is 
 *  released through APR-Util.
 */
#ifndef APR_LDAP_SIZELIMIT
#define APR_LDAP_SIZELIMIT -1
#endif

Thats make is mistaken sizelimit in a search request because acording to
http://www.ietf.org/rfc/rfc2251.txt size limit is defined as:

sizeLimit       INTEGER (0 .. maxInt),  and with
maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --

this is signed integer, not unsigned as supoused on util_ldap.c
On page 26 rfc2251 tells that a value of sizeLimit = 0 means no client sizelimit
restrictions. So APR_LDAP_SIZELIMIT should be:

/* Default define for ldap functions that need a SIZELIMIT but
 * do not have the define
 * XXX This should be removed once a supporting #define is 
 *  released through APR-Util.
 */
#ifndef APR_LDAP_SIZELIMIT
#define APR_LDAP_SIZELIMIT 0
#endif

I believe this issue could solve other bugs of ldap use.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 44015] - Bug in util_ldap.c, mod_ldap

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44015


covener@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From covener@gmail.com  2007-12-04 04:58 -------
This is fixed in the most recent release of apr-util (1.2.12), there was a
lengthy discussion on the issue but several SDKS support -1 (use connection
default limit) and don't always have LDAP_DEFAULT_LIMIT defined.

(the other SDKS don't send the -1 over the wire)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 44015] - Bug in util_ldap.c, mod_ldap

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44015


agustin.herranz@alumnos.uva.es changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |trivial
             Status|RESOLVED                    |REOPENED
           Priority|P2                          |P3
         Resolution|FIXED                       |




------- Additional Comments From agustin.herranz@alumnos.uva.es  2007-12-04 10:49 -------
(In reply to comment #1)
> This is fixed in the most recent release of apr-util (1.2.12), there was a
> lengthy discussion on the issue but several SDKS support -1 (use connection
> default limit) and don't always have LDAP_DEFAULT_LIMIT defined.
> 
> (the other SDKS don't send the -1 over the wire)

Microsoft LDAP SDK send -1 (0xFFFFFFFF) over the wire...
I have build apr, apr-util, mod_ldap and mod_authnz_ldap with Visual C++ 2005
Express and tested with apache 2.2.6 on an W2k server with Openldap server and
works well.

Still had to delete APR_LDAP_SIZELIMIT definition on util_ldap.c like said th
comment, and sync apr_ldap.hw to an apr_ldap.h.in style for:

#if APR_HAS_ZOS_LDAPSDK || APR_HAS_MICROSOFT_LDAPSDK
#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
#else
#ifdef LDAP_DEFAULT_LIMIT
#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
#else
#define APR_LDAP_SIZELIMIT -1 /* equivalent to LDAP_DEFAULT_LIMIT */
#endif
#endif

or better:


#ifdef LDAP_DEFAULT_LIMIT
#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
#else
#if APR_HAS_XXX_LDAPSDK /* who dont have defined LDAP_DEFAULT_SIZELIMIT but
support -1 */
#define APR_LDAP_SIZELIMIT -1 /* equivalent to LDAP_DEFAULT_LIMIT */
#else
#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
#endif
#endif

I thought this version is better because LDAP_DEFAULT_SIZELIMIT = -1 is defined
in a draft that update RFC1823 what is an informational document, as far i can
see, and LDAP_NO_LIMIT = 0 is defined in RFC2251 - RFC4511 LDAP v3 protocol what
is a proposed standard.




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org