Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 11650 invoked from network); 31 Oct 2009 14:02:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Oct 2009 14:02:30 -0000 Received: (qmail 39410 invoked by uid 500); 31 Oct 2009 14:02:29 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 39319 invoked by uid 500); 31 Oct 2009 14:02:28 -0000 Mailing-List: contact cvs-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 cvs@httpd.apache.org Received: (qmail 39310 invoked by uid 99); 31 Oct 2009 14:02:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Oct 2009 14:02:28 +0000 X-ASF-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Oct 2009 14:02:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0881D23888A6; Sat, 31 Oct 2009 14:02:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r831542 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h include/util_ldap.h modules/ldap/util_ldap.c Date: Sat, 31 Oct 2009 14:02:04 -0000 To: cvs@httpd.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091031140205.0881D23888A6@eris.apache.org> Author: covener Date: Sat Oct 31 14:02:04 2009 New Revision: 831542 URL: http://svn.apache.org/viewvc?rev=831542&view=rev Log: Stop trying to set the referral HOP limit on each connection since most SDKs don't seem to do anything with it, and causes an error on released openldap levels. Also moves/remove some macros internal to mod_ldap out of the public header for a major bump. Reported against APR in PR47501, but httpd shouldn't be asking for the option by default. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/include/ap_mmn.h httpd/httpd/trunk/include/util_ldap.h httpd/httpd/trunk/modules/ldap/util_ldap.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=831542&r1=831541&r2=831542&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Sat Oct 31 14:02:04 2009 @@ -10,6 +10,11 @@ mod_proxy_ftp: NULL pointer dereference on error paths. [Stefan Fritsch , Joe Orton] + *) mod_ldap: Avoid 500 errors with "Unable to set LDAP_OPT_REFHOPLIMIT option to 5" + when built against openldap by using SDK LDAP_OPT_REFHOPLIMIT defaults unless + LDAPReferralHopLimit is explicitly configured. + [Eric Covener] + *) mod_charset_lite: Honor 'CharsetOptions NoImplicitAdd'. [Eric Covener] Modified: httpd/httpd/trunk/include/ap_mmn.h URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=831542&r1=831541&r2=831542&view=diff ============================================================================== --- httpd/httpd/trunk/include/ap_mmn.h (original) +++ httpd/httpd/trunk/include/ap_mmn.h Sat Oct 31 14:02:04 2009 @@ -203,15 +203,16 @@ * 20091011.0 (2.3.3-dev) Move preserve_host{,_set} from proxy_server_conf to * proxy_dir_conf * 20091011.1 (2.3.3-dev) add debug_level to util_ldap_state_t + * 20091031.0 (2.3.3-dev) remove public LDAP referral-related macros * */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20091011 +#define MODULE_MAGIC_NUMBER_MAJOR 20091031 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a Modified: httpd/httpd/trunk/include/util_ldap.h URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_ldap.h?rev=831542&r1=831541&r2=831542&view=diff ============================================================================== --- httpd/httpd/trunk/include/util_ldap.h (original) +++ httpd/httpd/trunk/include/util_ldap.h Sat Oct 31 14:02:04 2009 @@ -93,11 +93,6 @@ always=LDAP_DEREF_ALWAYS } deref_options; -#define AP_LDAP_DEFAULT_HOPLIMIT 5 /* make sure these two stay */ -#define AP_LDAP_DEFAULT_HOPLIMIT_STR "5" /* in synch with each other! */ -#define AP_LDAP_CHASEREFERRALS_OFF 0 -#define AP_LDAP_CHASEREFERRALS_ON 1 - /* Structure representing an LDAP connection */ typedef struct util_ldap_connection_t { LDAP *ldap; Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=831542&r1=831541&r2=831542&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ldap/util_ldap.c (original) +++ httpd/httpd/trunk/modules/ldap/util_ldap.c Sat Oct 31 14:02:04 2009 @@ -62,6 +62,10 @@ #endif #endif +#define AP_LDAP_HOPLIMIT_UNSET -1 +#define AP_LDAP_CHASEREFERRALS_OFF 0 +#define AP_LDAP_CHASEREFERRALS_ON 1 + module AP_MODULE_DECLARE_DATA ldap_module; #define LDAP_CACHE_LOCK() do { \ @@ -384,8 +388,8 @@ return(result->rc); } - if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { - /* Referral hop limit - only if referrals are enabled */ + if ((ldc->ReferralHopLimit != AP_LDAP_HOPLIMIT_UNSET) && ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) { + /* Referral hop limit - only if referrals are enabled and a hop limit is explicitly requested */ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "Setting referral hop limit to %d.", ldc->ReferralHopLimit); @@ -2410,7 +2414,7 @@ /* defaults are AP_LDAP_CHASEREFERRALS_ON and AP_LDAP_DEFAULT_HOPLIMIT */ dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_ON; - dc->ReferralHopLimit = AP_LDAP_DEFAULT_HOPLIMIT; + dc->ReferralHopLimit = AP_LDAP_HOPLIMIT_UNSET; return dc; } @@ -2764,7 +2768,7 @@ AP_INIT_TAKE1("LDAPReferralHopLimit", util_ldap_set_referral_hop_limit, NULL, OR_AUTHCFG, "Limit the number of referral hops that LDAP can follow. " - "(Integer value, default=" AP_LDAP_DEFAULT_HOPLIMIT_STR ")"), + "(Integer value, Consult LDAP SDK documentation for applicability and defaults"), AP_INIT_TAKE1("LDAPLibraryDebug", util_ldap_set_debug_level, NULL, RSRC_CONF,