Commit Graph

175 Commits

Author SHA1 Message Date
3ebc961934 Merge r1818040 from trunk:
PR61891: looping over mostly full LDAP cache

  *) mod_ldap: Fix a case where a full LDAP cache would continually fail to
     purge old entries and log AH01323. PR61891.


Submitted By: Hendrik Harms <hendrik.harms gmail.com>
Committed By: covener
Reviewed By: covener, jim, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1820800 13f79535-47bb-0310-9956-ffa450edef68
2018-01-10 22:05:23 +00:00
c62375851b Merge r1700317, r1700318, r1700319, r1700320, r1700321, r1700322, r1700326, r1700328, r1700330, r1700331, r1700332, r1700334, r1700336, r1700338 from trunk:
Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting + some minor style issues

Remove useless line

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1701772 13f79535-47bb-0310-9956-ffa450edef68
2015-09-08 11:10:16 +00:00
78014b3300 mod_ldap: Fix unexpected return codes from LDAP lib being coerced
into LDAP_NO_SUCH_ATTRIBUTE + some new tracing.

     trunk patch: http://svn.apache.org/r1687980
                  http://svn.apache.org/r1689694
                  http://svn.apache.org/r1689698
Backports: 1687980, 1689694, 1689698
Submitted by: covener
Reviewied by: covener, wrowe, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1690114 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 14:51:57 +00:00
7b44909928 Merge r1685650 from trunk:
LDAP connection pool did not release/close connections with 
"LDAPConnectionPoolTTL 0".  PR58037.

Submitted by: Ted Phelps <phelps gnusto.com>
committed by: covener


Submitted by: covener
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1686275 13f79535-47bb-0310-9956-ffa450edef68
2015-06-18 17:06:48 +00:00
b5530676fd Merge r1685659 from trunk:
Fix directive name in error message + fix some style issue
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1685869 13f79535-47bb-0310-9956-ffa450edef68
2015-06-16 17:20:26 +00:00
99d7794f20 Merge r1611979, r1611725, r1588448, r1642803, r1657949, r1451108 (part of it),
r1643672, r1496178 from trunk

   * Synch with trunk:
        - Add missing APLOGNO.
        - mod_deflate: don't require <limits.h> by using APR_INT32_MAX instead of INT_MAX.
        - Move two variable assignments off the fast path.
        - Fix curly braces style. Remove useless empty lines
        - tab vs space
        - Removed tabs.
        - dump fcgi headers with trace8 instead of debug+compile-time flag.
        - Drop severity of "LDAP: Setting referrals to ON" from DEBUG to TRACE4

Submitted by: jailletc36, ylavic, minfrin, fuankg, covener
Reviewed by: jailletc36, minfrin, ylavic
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1661845 13f79535-47bb-0310-9956-ffa450edef68
2015-02-24 06:22:22 +00:00
9feef83d24 Merge r1613682 from trunk:
In 2.4.10, AuthLDAPBindDN might not be used for some LDAP searches, causing 
LDAP authz failures if AuthLDAPBindDN was able to search through more of
LDAP than web users.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1631119 13f79535-47bb-0310-9956-ffa450edef68
2014-10-11 21:18:45 +00:00
7d3ce74b78 Merge r1452551, r1607960 from trunk:
PR54587: LDAP connections used for authn were not respecting 
LDAPConnectionPoolTimeout due to confusion over what "bound" means.

Added some LDAP trace at TRACE5 to track how LDAP connections are
reused and rebound.



make LDAPConnectionPoolTTL more conservative, use r->request_time rather than
end-of-request time, and only update it after a round-trip with the LDAP
server rather than every time we check back into the pool.


Submitted by: covener
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1610396 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 12:07:55 +00:00
fdbb876497 * mod_ldap: Don't filter subgroups on cn=*
Proposed by: covener
Reviewed by: jim, rjung

Backport of r1528143 from trunk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1528970 13f79535-47bb-0310-9956-ffa450edef68
2013-10-03 18:55:16 +00:00
6d4683dc46 mod_ldap: add TRACE5 for LDAP retries
trunk patch: http://svn.apache.org/r1510085

Submitted by: covener
Reviewed by: jim, humbedooh


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523266 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 15:11:30 +00:00
585d62309b mod_ldap: retry on an LDAP timeout during authn.
trunk patch: http://svn.apache.org/r1510084

Submitted by: covener
Reviewed by: jim, humbedooh


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523264 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 15:07:43 +00:00
cb67f72944 mod_ldap: "LDAPReferrals off" does not disable LDAPReferrals feature.
Make "off" really "off" and add "unset" to take SDK defaults

trunk patch: http://svn.apache.org/r1517388
       docs: http://svn.apache.org/r1518265

Submitted by: covener
Reviewed by: jim, humbedooh


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523263 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 15:02:10 +00:00
02897fbc29 Merge r1384913, r1399687, r1419719, r1419755, r1416278, r1330189 from trunk:
Add a few AP_DEBUG_ASSERT()s for the benefit of clang


style tweak

No need to clear memory that is fully initialized just the line after.

Avoid unnecessary %s substitution

Avoid processing some files twice if APR_INCLUDEDIR and
APU_INCLUDEDIR containin the same path but differing in
doubled slashes.


Fixed position of the NEED_ENHANCED_ESCAPES define.

This define should be outside of the else case so that it
gets also defined if we cross-compile for Win32 or OS2.

Submitted by: sf, trawick, jailletc36, jailletc36, sf, fuankg
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1439391 13f79535-47bb-0310-9956-ffa450edef68
2013-01-28 13:13:18 +00:00
679d2ece88 Merge r1337344, r1378178, r1397636, r1398025, r1398040, r1398481, r1407004, r1407006, r1407088, r1407528 from trunk:
* support/suexec.c: Add gcc format-string attributes to logging
  functions.  
  (main): Always print uid/gid as unsigned long, and cast to avoid
  warnings (which somewhat defeats the point of the format string
  attrs, but is necessary since the size of gid/uid varies).


remove an unnecessary check in a nest loop of ap_create_environment()


s/;;/;/

No need to test for NULL before calling apr_pstrdup.

No need it apr_pcalloc here, the memory is fully initialized the line just after

cppCheck: unreadVariable - 'serviceFlag' is not used in the function, so remove it

Remove unused code. "Next week" hasn't happened in the last 10 years or so.


log client error at level debug, log broken Host header value


remove some more old unused code


remove obsolete comment from 1.3 days

Submitted by: jorton, pqf, jailletc36, jailletc36, jailletc36, jailletc36, sf, sf, sf, sf
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1416581 13f79535-47bb-0310-9956-ffa450edef68
2012-12-03 16:33:42 +00:00
577acc2d12 Revert r1373105, the merging of incompatible DefaultRuntimeDir
changes.

The trunk patches for these all have some configuration breakage
as 2.4.x interprets the individual directive or API parameter as
relative to ServerRoot whereas trunk interprets everything
relative to DefaultRuntimeDir.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1373168 13f79535-47bb-0310-9956-ffa450edef68
2012-08-14 23:59:24 +00:00
f8c5165c28 Merge r1364695, r1369477, r1369808, r1370288, r1370225, r1370763, r1371684 from trunk:
mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.


core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the
scoreboard (ScoreBoardFile).


The Pidfile directive and ap_log_pid()/ap_remove_pid()/ap_read_pid()
now respect DefaultRuntimeDir


Mutex directive: finish support of DefaultRuntimeDir

a partial conversion was made in r1299718, but I'm not
sure when that change is effective


mod_socache_shmcb and mod_socache_dbm: finish support of
DefaultRuntimeDir

a partial conversion was made in r1299718, affecting cases
where no filename was specified


mod_slotmem_plain: make the "filename" key relative to
DefaultRuntimeDir if not absolute

mod_slotmem_plain does not externalize or check the full path
in any way, so this change is just for consistency with other
modules which build paths to run-time artifacts.


make LDAPSharedCacheFile relative to DefaultRuntimeDir

Submitted by: trawick
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1373105 13f79535-47bb-0310-9956-ffa450edef68
2012-08-14 21:08:35 +00:00
2ac9e2c7da Merge r1369568 from trunk:
bytes is not a unit of filename


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1369569 13f79535-47bb-0310-9956-ffa450edef68
2012-08-05 13:02:24 +00:00
b6ae8ca44a Backport r1209766, r1210252, r1210284:
Add lots of unique tags to error log messages

ssl_util.c: Downgrade some dynamic locking messages from level DEBUG
to TRACE1-3


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1210287 13f79535-47bb-0310-9956-ffa450edef68
2011-12-05 00:08:01 +00:00
04adeb4e59 Merge r1209601:
Fix segfault with Solaris LDAP SDK when enabling ldaps.

Enable SSL by passing secure=1 to apr_ldap_init instead of calling
apr_ldap_set_option(... APR_LDAP_OPT_TLS ...).

This change carefully avoids any change of behavior on non-Solaris LDAP SDKs.

PR: 42682


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1209604 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 17:50:02 +00:00
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
93e479669b no termination of the loop in 1166823.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166839 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 18:26:54 +00:00
81097d5190 mod_ldap: Optional function uldap_ssl_supported(r) always returned false
if called from a virtual host with mod_ldap directives in it.  Did not
affect mod_authnz_ldap's usage of mod_ldap.  [Eric Covener]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166823 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 17:37:46 +00:00
c2236c7cbf The default timeout value of 10s lives in two places, the per-server config
and in this initialization. Drop the latter and check to see if a timeout
is requested in the per-server config.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166662 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:53:06 +00:00
5124ad1b62 s/lderrno/uldap_ld_errno, but keep it internal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157678 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 22:19:09 +00:00
ead0bcf35c add a static method to retrieve the LDAP errno, and call from a
few other paths that have us returning LDAP_OTHER (since
only 'server down' is retryable, we want to work hard to get
it returned when appropriate)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157677 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 22:03:02 +00:00
f19641462b Compare value instead of string pointer
Remove unused label
Remove unused var


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157357 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 09:14:33 +00:00
a68a8e4918 Accept LDAP_OPT_CONNECT_TIMEOUT as an alternative to LDAP_OPT_NETWORK_TIMEOUT.
An alternative on at least some IBM client libraries:

  http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.IBMDS.doc/progref281.htm#opttimeout



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157111 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 13:56:54 +00:00
f5b63175fc mod_ldap: remove hard-coded loops of 10 retries w/o delay with a configurable
number of retries (LDAPRetries, default 3) and configurable delay between 
retries (LDAPRetryDelay, no delay by default).

The LDAP connection is re-initted every other retry, instead of
on the fifth retry -- this was a much more recent addition then
the basic looping behavior.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1156790 13f79535-47bb-0310-9956-ffa450edef68
2011-08-11 20:05:18 +00:00
293bffa871 Try to obtain the specific LDAP error code returned during a failed
ldap_simple_bind(). 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1156001 13f79535-47bb-0310-9956-ffa450edef68
2011-08-10 02:06:52 +00:00
602791140b Revert r1129808:
Incorporate the ap_ldap incomplete API, as there is no interest or effort
    at APR to make this a complete abstraction, and it was voted 'off the island'
    with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
    or apr+util 1.x.

This also reverts part of r1142938, which needs to be re-done.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150172 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:29:42 +00:00
2d42def875 Revert r1140069:
Fix load order dependencies in LDAP code by switching to use of APR
    optional functions for the inter-module API...



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:10:49 +00:00
d37c52a6e4 Silence compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142733 13f79535-47bb-0310-9956-ffa450edef68
2011-07-04 16:37:46 +00:00
559c6ae018 Fix load order dependencies in LDAP code by switching to use of APR
optional functions for the inter-module API:

* modules/ldap/ldap_private.h: New file, containing "real" function
  declarations, copied from...

* include/ap_ldap.h.in, include/ap_ldap_url.h,
  include/ap_ldap_option.h, include/ap_ldap_init.h,
  include/ap_ldap_rebind.h: ... here.  All declarations changed to APR
  optional function declarations.

* modules/ldap/util_ldap.c (util_ldap_register_hooks): Register all
  the new optional functions.

* modules/aaa/mod_authnz_ldap.c (ImportULDAPOptFn): Pick up optional
  function stub for ap_ldap_url_parse.
  (mod_auth_ldap_parse_url): Use it here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1140069 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 09:27:04 +00:00
4bc8885d8d Fix "statement not reached" warnings with sun cc
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1139391 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 17:59:44 +00:00
37770675d7 Incorporate the ap_ldap incomplete API, as there is no interest or effort
at APR to make this a complete abstraction, and it was voted 'off the island'
with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
or apr+util 1.x.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129808 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 17:10:11 +00:00
46dc6e060b mod_ldap: Make LDAPSharedCacheSize 0 create a non-shared-memory cache per
process as opposed to disabling caching completely. This allows to use
the non-shared-memory cache as a workaround for the shared memory cache
not being available during graceful restarts

PR: 48958


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096577 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 20:00:43 +00:00
cdba63f119 always use (via break) the LDAP connection we're looking at once it's a match,
whether it's used as-is or has just been unbound.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086433 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 22:43:08 +00:00
4355155ced fix incorrect type of LDAP connection pool member, fix naming fors
style guidlines



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086432 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 22:40:20 +00:00
05e818b8b2 change all the negative values for LDAPConnPoolTTL into
-2 (AP_LDAP_CONNPOOL_INFINITE), so we can't get confused 
over -1 (AP_LDAP_CONNPOOL_DEFAULT) being merged.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081146 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 16:45:06 +00:00
7dbcca96c1 *) mod_ldap: Add LDAPConnectionPoolTTL to give control over lifetime
of bound backend LDAP connections.  PR47634 [Eric Covener]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081007 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:42:36 +00:00
813da4a81f ifdef 0-out uldap_connection_remove(), which is not part of the API and
currently has no callers. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081006 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:20:23 +00:00
03c032b4e4 Lay some groundwork for improvements to the connection pool.
remove unnecessary uldap_connection_cleanup (nothing needed between unbind 
  and remove)

  properly remove rebind callback info when credentials change

  maintain a separate pool for the rebind callback storage so it can be cleared
  when the connection is unbound.

(major bump for util_ldap function removal)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081005 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:18:21 +00:00
2d471132db whitespace-only: re-indent the blocks I wrapped in an if with r1080922
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080923 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 12:03:59 +00:00
9885316bba avoid apr_ldap_rebind_{add,remove} when referral chasing is turned off
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080922 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 12:02:40 +00:00
4598f1a7d4 fix some grammar mistakes, mostly in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 00:35:39 +00:00
385da96d50 Use ap_state_query() to fix many modules that were not correctly initializing
if they were not active during server startup but got enabled later during a
graceful restart (in which case they need to do all work during a single
config run).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070153 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 21:23:56 +00:00
7cecbabda3 Avoid unnecessariy initialisation before we test ldap-status handler name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024453 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 22:53:41 +00:00
73bae8d90f Properly check the result returned by apr_ldap_init: There may have been an
error even if ldc->ldap != NULL.

PR 46076


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986974 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 22:59:45 +00:00
c3490c3c66 set free()d pointers to NULL to avoid potential use-after-free bugs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982011 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:36:03 +00:00
e842857ce9 whitespace only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@963084 13f79535-47bb-0310-9956-ffa450edef68
2010-07-11 14:50:13 +00:00