Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 33084 invoked from network); 2 Mar 2007 20:03:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2007 20:03:42 -0000 Received: (qmail 29757 invoked by uid 500); 2 Mar 2007 20:03:47 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 29702 invoked by uid 500); 2 Mar 2007 20:03:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 29691 invoked by uid 99); 2 Mar 2007 20:03:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 12:03:47 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [137.65.250.26] (HELO victor.provo.novell.com) (137.65.250.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 12:03:35 -0800 Received: from INET-PRV3-MTA by victor.provo.novell.com with Novell_GroupWise; Fri, 02 Mar 2007 13:03:12 -0700 Message-Id: <45E8208A.6720.00AC.0@novell.com> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Beta Date: Fri, 02 Mar 2007 13:03:06 -0700 From: "Brad Nicholes" To: Subject: Re: util_ldap.c use of hardcoded sizelimit on ldap_search_ext_s causing error References: <3ce0569d0702151202l7d7d8252m2d14ccdaf45bb489@mail.gmail.com> <45DABCBE.6720.00AC.0@novell.com> <3ce0569d0702220612n3750e50blf7a7d570a7a4c883@mail.gmail.com> <45DD5F4B.6720.00AC.0@novell.com> <3ce0569d0702221152h3ffa1121j8a8f5586c6b35c67@mail.gmail.com> <45DEA0AA.6720.00AC.0@novell.com> <3ce0569d0702280726p24d1b536la278b021e0f07aad@mail.gmail.com> <45E58440.6720.00AC.0@novell.com> <3ce0569d0703011807g15dcba1eq20bb20c57df6774b@mail.gmail.com> In-Reply-To: <3ce0569d0703011807g15dcba1eq20bb20c57df6774b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Looks good, I think I like your first suggestion better, putting the = #ifdef in apr_ldap.h.in. This seems a little more straight forward rather = than hiding the value in configure. Brad >>> On 3/1/2007 at 7:07 PM, in message <3ce0569d0703011807g15dcba1eq20bb20c57df6774b@mail.gmail.com>, "David = Jones" wrote: > How about: > changes to apr_ldap.h.in: > #define APR_HAS_ZOS_LDAPSDK @apu_has_ldap_zos@ >=20 > #if APR_LDAP_HAS_ZOS_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 >=20 >=20 > This part of the util_ldap.c patch at the bottom could allow util_ldap.c= to > compile regardless of apr-util level, but would not typically commit it? > +#ifndef APR_LDAP_SIZELIMIT > +#define APR_LDAP_SIZELIMIT -1 > #endif >=20 >=20 >=20 > Or could add info to apu-conf.m4 for each SDK, eliminating the need for = the > ZOS specific #if (would just need #define APR_LDAP_SIZELIMIT > @apu_ldap_sizelimit) > (If get any input from other SDKs then could replace its -1 with > LDAP_DEFAULT_LIMIT or LDAP_NO_LIMIT as i did for z/OS) >=20 > Index: apu-conf.m4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /m0xa/cvs/phoenix/2.2.4/srclib/apr-util/build/apu-conf.m4,v > retrieving revision 1.2 > diff -u -d -b -r1.2 apu-conf.m4 > --- apu-conf.m4 12 Feb 2007 18:19:20 -0000 1.2 > +++ apu-conf.m4 1 Mar 2007 20:07:26 -0000 >=20 > @@ -267,10 +273,13 @@ > apu_has_ldap_sslinit=3D"0" > apu_has_ldapssl_install_routines=3D"0" > apu_has_ldap_openldap=3D"0" > +apu_has_ldap_sizelimit=3D"0" > @@ -354,42 +363,57 @@ > AC_EGREP_CPP([OpenLDAP], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_openldap=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"OpenLD= AP"]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > AC_EGREP_CPP([Sun Microsystems Inc.], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_solaris=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"Solari= s"]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > AC_EGREP_CPP([Novell], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_novell=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"Novell= "]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > AC_EGREP_CPP([Microsoft Corporation.], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_microsoft=3D"1" > + apu_ldap_sizelimit=3D"-1" >=20 > apr_cv_ldap_toolkit=3D"Microsoft"]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > AC_EGREP_CPP([Netscape Communications Corp.], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_netscape=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"Netsca= pe"]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > AC_EGREP_CPP([mozilla.org], [$lber_h > $ldap_h > LDAP_VENDOR_NAME], [apu_has_ldap_mozilla=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"Mozill= a"]) > fi > if test "x$apr_cv_ldap_toolkit" =3D "x"; then > + AC_EGREP_CPP([IBM], [$lber_h > + $ldap_h > + LDAP_VENDOR_NAME], [apu_has_ldap_zos=3D"1" > + > apu_ldap_sizelimit=3D"LDAP_NO_LIMIT" > + apr_cv_ldap_toolkit=3D"ZOS"])= > + fi > + if test "x$apr_cv_ldap_toolkit" =3D "x"; then > apu_has_ldap_other=3D"1" > + apu_ldap_sizelimit=3D"-1" > apr_cv_ldap_toolkit=3D"unknown" > fi > + > ]) > fi >=20 > @@ -398,15 +422,20 @@ > LIBS=3D$save_libs > ]) >=20 > +AC_SUBST(apu_ldap_sizelimit) > AC_SUBST(ldap_h) > AC_SUBST(lber_h) > AC_SUBST(ldap_ssl_h) >=20 > @@ -415,6 +444,7 @@ > AC_SUBST(apu_has_ldap_microsoft) > AC_SUBST(apu_has_ldap_netscape) > AC_SUBST(apu_has_ldap_mozilla) > +AC_SUBST(apu_has_ldap_zos) > AC_SUBST(apu_has_ldap_other) >=20 > ]) >=20 >=20 >=20 >=20 > And finally this same either way except for the question on #ifndef > APR_LDAP_SIZELIMIT > Index: util_ldap.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /m0xa/cvs/phoenix/2.2.4/modules/ldap/util_ldap.c,v > retrieving revision 1.3 > diff -u -d -b -r1.3 util_ldap.c > --- util_ldap.c 15 Feb 2007 18:55:41 -0000 1.3 > +++ util_ldap.c 1 Mar 2007 20:19:39 -0000 > @@ -45,15 +45,8 @@ > #include "unixd.h" > #endif >=20 > -#ifndef LDAP_NO_LIMIT > -#define LDAP_NO_LIMIT -1 > +#ifndef APR_LDAP_SIZELIMIT > +#define APR_LDAP_SIZELIMIT -1 > #endif >=20 > module AP_MODULE_DECLARE_DATA ldap_module; > @@ -681,7 +681,7 @@ > /* search for reqdn */ > if ((result =3D ldap_search_ext_s(ldc->ldap, (char *)reqdn, > LDAP_SCOPE_BASE, > "(objectclass=3D*)", NULL, 1, > - NULL, NULL, NULL, LDAP_NO_LIMIT, = &res)) > + NULL, NULL, NULL, APR_LDAP_SIZELIMIT= , > &res)) > =3D=3D LDAP_SERVER_DOWN) > { > ldc->reason =3D "DN Comparison ldap_search_ext_s() " > @@ -960,13 +961,14 @@ > if ((result =3D ldap_search_ext_s(ldc->ldap, > (char *)basedn, scope, > (char *)filter, attrs, 0, > - NULL, NULL, NULL, LDAP_NO_LIMIT, = &res)) > + NULL, NULL, NULL, APR_LDAP_SIZELIMIT= , > &res)) > =3D=3D LDAP_SERVER_DOWN) > { > ldc->reason =3D "ldap_search_ext_s() for user failed with = server > down"; >=20 > @@ -1200,14 +1202,14 @@ > if ((result =3D ldap_search_ext_s(ldc->ldap, > (char *)basedn, scope, > (char *)filter, attrs, 0, > - NULL, NULL, NULL, LDAP_NO_LIMIT, = &res)) > + NULL, NULL, NULL, APR_LDAP_SIZELIMIT= , > &res)) > =3D=3D LDAP_SERVER_DOWN) > { > ldc->reason =3D "ldap_search_ext_s() for user failed with = server > down"