You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2007/03/13 18:53:23 UTC
svn commit: r517788 - /httpd/httpd/trunk/modules/ldap/util_ldap.c
Author: bnicholes
Date: Tue Mar 13 10:53:22 2007
New Revision: 517788
URL: http://svn.apache.org/viewvc?view=rev&rev=517788
Log:
Remove the hardcoded size limit parameter for ldap_search_ext_s
and replace it with an APR_ defined value that is set according
to the LDAP SDK being used.
Submitted by: David Jones <oscaremma gmail com>
Modified:
httpd/httpd/trunk/modules/ldap/util_ldap.c
Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?view=diff&rev=517788&r1=517787&r2=517788
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Tue Mar 13 10:53:22 2007
@@ -52,8 +52,13 @@
#define LDAP_CA_TYPE_BASE64 2
#define LDAP_CA_TYPE_CERT7_DB 3
-#ifndef LDAP_NO_LIMIT
-#define LDAP_NO_LIMIT -1
+/* 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
module AP_MODULE_DECLARE_DATA ldap_module;
@@ -660,7 +665,7 @@
/* search for reqdn */
if ((result = ldap_search_ext_s(ldc->ldap, (char *)reqdn, LDAP_SCOPE_BASE,
"(objectclass=*)", NULL, 1,
- NULL, NULL, NULL, LDAP_NO_LIMIT, &res))
+ NULL, NULL, NULL, APR_LDAP_SIZELIMIT, &res))
== LDAP_SERVER_DOWN)
{
ldc->reason = "DN Comparison ldap_search_ext_s() "
@@ -938,7 +943,7 @@
if ((result = 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))
== LDAP_SERVER_DOWN)
{
ldc->reason = "ldap_search_ext_s() for user failed with server down";
@@ -1178,7 +1183,7 @@
if ((result = 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))
== LDAP_SERVER_DOWN)
{
ldc->reason = "ldap_search_ext_s() for user failed with server down";